util: Remove unused escape_html function.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-02-13 17:22:24 -08:00 committed by Tim Abbott
parent e5b70920e5
commit 207a734d46
1 changed files with 0 additions and 9 deletions

View File

@ -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, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
};
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. :/