mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
util: Remove unused escape_html function.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
e5b70920e5
commit
207a734d46
@@ -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, '"')
|
||||
.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. :/
|
||||
|
||||
Reference in New Issue
Block a user