Thu, 18 Mar 2010 18:35:35 +0000
Add htmlescape() helper function
js/supportchat.js | file | annotate | diff | comparison | revisions |
--- a/js/supportchat.js Thu Mar 18 18:35:19 2010 +0000 +++ b/js/supportchat.js Thu Mar 18 18:35:35 2010 +0000 @@ -122,4 +122,13 @@ } } +/*** Helper functions */ +function htmlescape(s) +{ + return s.replace(/&/g,'&'). + replace(/>/g,'>'). + replace(/</g,'<'). + replace(/"/g,'"'); +} + $(display_ui); //FIXME (debugging)