test.js./ | |
---|---|
Escape the given Examples
| exports.escape = function(html){
return String(html)
.replace(/&(?!\w+;)/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>');
}; |
Escape the given Params html String- string to be escaped Returns Stringescaped html Type number See exports.escape API public Examples
| exports.escape2 = function(html){
return String(html)
.replace(/&(?!\w+;)/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>');
};
|