From 207a734d46122af9be10fdc7c648cde4089b5396 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 13 Feb 2020 17:22:24 -0800 Subject: [PATCH] util: Remove unused escape_html function. Signed-off-by: Anders Kaseorg --- static/js/util.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/static/js/util.js b/static/js/util.js index 9a745f97cc..97f360bbd6 100644 --- a/static/js/util.js +++ b/static/js/util.js @@ -153,15 +153,6 @@ exports.make_strcmp = function () { }; exports.strcmp = exports.make_strcmp(); -exports.escape_html = function (html, encode) { - return html - .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); -}; - exports.escape_regexp = function (string) { // code from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions // Modified to escape the ^ to appease jslint. :/