function CleanChars() local sel = editor:GetSelText(); local length = string.len(sel); local itt = 1; local tempChar; local tempString = ""; while itt < length+1 do tempChar = string.sub(sel,itt,itt); if tempChar == ">" then tempString = tempString .. ">"; elseif tempChar == "<" then tempString = tempString .. "<"; elseif tempChar == "&" then tempString = tempString .. "&"; elseif tempChar == [["]] then tempString = tempString .. """; elseif tempChar == [[/]] then tempString = tempString .. "⁄"; elseif tempChar == [[\]] then tempString = tempString .. "\"; else tempString = tempString .. tempChar; end itt=itt+1; end editor:ReplaceSel(tempString); end