hive/html/js/basic.js
//inside an html element's onclick etc. attribute when assembling html by concatenation
inside an html element's onclick etc. attribute when assembling html by concatenation
inside an html element ' s onclick etc . attribute when assembling html by concatenation
function sanitizeElementAttrJS(s)
{
    s = "" + s;
    s = s.replace(/\\/g, "\\\\");
    s = s.replace(/&/g, "\\&amp;");
    s = s.replace(/'/g, "\\&#x27;");
    s = s.replace(/"/g, "\\&#x22;");
    return s;
}
function sanitizeElementAttrJS ( s ) { s = "" + s ; s = s . replace ( / \\ / g , "\\\\" ) ; s = s . replace ( / & / g , "\\&amp;" ) ; s = s . replace ( / ' / g , "\\&#x27;" ) ; s = s . replace ( / " / g , "\\&#x22;" ) ; return s ; }
inside an html element's onclick etc.
inside an html element ' s onclick etc .