diff --git a/docs/index.js b/docs/index.js index 646b9f8..af3c94e 100644 --- a/docs/index.js +++ b/docs/index.js @@ -30,11 +30,20 @@ codeAstOptimized.renderer.$cursorLayer.element.style.opacity=0; $('#opt_mode').val(localStorage.getItem('optimazationMode') || 'all'); $('#opt_rules').val(localStorage.getItem('optimazationRules')); +function escapeHtml(unsafe) { + return unsafe + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +} + function generateErrorListHTML(errors) { let html = '