Make coding style project consistent.
This commit is contained in:
@@ -87,12 +87,14 @@ function parseTag(html, onTag, escapeHtml) {
|
|||||||
}
|
}
|
||||||
if ((c === '"' || c === "'")) {
|
if ((c === '"' || c === "'")) {
|
||||||
var i = 1;
|
var i = 1;
|
||||||
while ((html.charAt(currentPos - i) === " ") || (html.charAt(currentPos - i) === "=")) {
|
var ic = html.charAt(currentPos - i);
|
||||||
if (html.charAt(currentPos - i) === "=") {
|
|
||||||
|
while ((ic === " ") || (ic === "=")) {
|
||||||
|
if (ic === "=") {
|
||||||
quoteStart = c;
|
quoteStart = c;
|
||||||
continue chariterator;
|
continue chariterator;
|
||||||
}
|
}
|
||||||
i++;
|
ic = html.charAt(currentPos - ++i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -366,9 +366,8 @@ describe("test custom XSS method", function() {
|
|||||||
var html = xss(source, {
|
var html = xss(source, {
|
||||||
onTag: function(_, E, S) {
|
onTag: function(_, E, S) {
|
||||||
if (S.isWhite && "a" === _) {
|
if (S.isWhite && "a" === _) {
|
||||||
if (S.isClosing)
|
if (S.isClosing) return "</span></a>";
|
||||||
return "</span></a>";
|
return "".concat(E, '<span>');
|
||||||
return "".concat(E, '<span>')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user