Open pfrazee opened 10 years ago
Resources:
https://code.google.com/p/google-caja/wiki/JsHtmlSanitizer https://developer.mozilla.org/en-US/docs/Web/API/DOMParser https://developer.mozilla.org/en-US/Add-ons/Code_snippets/HTML_to_DOM
var oParser = new DOMParser();
var oDOM = oParser.parseFromString('<div>'+html+'</div>', "text/html");
update.html = oDOM.body.innerHTML;
Related: #50
https://github.com/pfraze/machine/wiki/Security-Design