Revert "fix: comment has encoded (#257)"
This reverts commit 9f6a37b34d.
This commit is contained in:
@@ -159,15 +159,6 @@ function escapeHtml(html) {
|
||||
return html.replace(REGEXP_LT, "<").replace(REGEXP_GT, ">");
|
||||
}
|
||||
|
||||
/**
|
||||
* default escapeHtml function but dont escape comment
|
||||
*
|
||||
* @param {String} html
|
||||
*/
|
||||
function escapeHtmlNotComment(html) {
|
||||
return html.replace(REGEXP_LT_NOT_COMMENT, "<").replace(REGEXP_RT_NOT_COMMENT, ">");
|
||||
}
|
||||
|
||||
/**
|
||||
* default safeAttrValue function
|
||||
*
|
||||
@@ -237,8 +228,6 @@ function safeAttrValue(tag, name, value, cssFilter) {
|
||||
// RegExp list
|
||||
var REGEXP_LT = /</g;
|
||||
var REGEXP_GT = />/g;
|
||||
var REGEXP_LT_NOT_COMMENT = /<(?!!--)/g;
|
||||
var REGEXP_RT_NOT_COMMENT = /(?<!--)>/g;
|
||||
var REGEXP_QUOTE = /"/g;
|
||||
var REGEXP_QUOTE_2 = /"/g;
|
||||
var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
|
||||
@@ -455,7 +444,6 @@ exports.onTagAttr = onTagAttr;
|
||||
exports.onIgnoreTagAttr = onIgnoreTagAttr;
|
||||
exports.safeAttrValue = safeAttrValue;
|
||||
exports.escapeHtml = escapeHtml;
|
||||
exports.escapeHtmlNotComment = escapeHtmlNotComment;
|
||||
exports.escapeQuote = escapeQuote;
|
||||
exports.unescapeQuote = unescapeQuote;
|
||||
exports.escapeHtmlEntities = escapeHtmlEntities;
|
||||
|
||||
Reference in New Issue
Block a user