Cross-Browser Rich Text Editor (RTE) Demo
For more information, visit the Cross-Browser Rich Text Editor (RTE) home page.
function RTESafe(strText) {
//returns safe code for preloading in the RTE
tmpString = trim(strText);
//convert all types of single quotes
tmpString = ReplaceNoCase(tmpString, chr(145), chr(39), "ALL");
tmpString = ReplaceNoCase(tmpString, chr(146), chr(39), "ALL");
tmpString = ReplaceNoCase(tmpString, chr(39), "\'", "ALL");
//convert all types of double quotes
tmpString = ReplaceNoCase(tmpString, chr(147), chr(34), "ALL");
tmpString = ReplaceNoCase(tmpString, chr(148), chr(34), "ALL");
//tmpString = ReplaceNoCase(tmpString, """", "\""", "ALL");
//replace carriage returns & line feeds
tmpString = ReplaceNoCase(tmpString, chr(10), " ", "ALL");
tmpString = ReplaceNoCase(tmpString, chr(13), " ", "ALL");
return(tmpString);
}