Universeorange.com/Docs/
ready(() => {
let element = select('#root');
element.html('<h1>Hello World!</h1>');
console.log(element.htmlspecialchars(element.html(), 'ENT_QUOTES'));
//<h1>Hello World!</h1>
element.html("ab\"c'd");
console.log(element.htmlspecialchars(element.html(), ['ENT_NOQUOTES', 'ENT_QUOTES']));
//ab"c'd
});
Htmlspecialchars transform special chars in html to their entities.
Last modified: 2021-06-07
© 2021 universeorange.com