mirror of https://github.com/zulip/zulip.git
util: Remove unused escape_html function.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
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. :/
|
||||
|
|
Loading…
Reference in New Issue