function escape(html) {
    return html.replace(/[<|>|&]/g, function (match) {
        switch (match) {
            case '<': return '&lt;';
            case '>': return '&gt;';
            case '&': return '&amp;';
            default: return match;
        }
    });
}
/**
 * Converts HTML characters inside the string to use entities instead. Makes the string safe from
 * being used e.g. in HTMLElement.innerHTML.
 */
Converts HTML characters inside the string to use entities instead. Makes the string safe from
being used e.g.
Converts HTML characters inside the string to use entities instead . Makes the string safe from being used e . g .
function escape(html) {
    return html.replace(/[<|>|&]/g, function (match) {
        switch (match) {
            case '<': return '&lt;';
            case '>': return '&gt;';
            case '&': return '&amp;';
            default: return match;
        }
    });
}
function escape ( html ) { return html . replace ( / [<|>|&] / g , function ( match ) { switch ( match ) { case '<' : return '&lt;' ; case '>' : return '&gt;' ; case '&' : return '&amp;' ; default : return match ; } } ) ; }
Converts HTML characters inside the string to use entities instead.
Converts HTML characters inside the string to use entities instead .