We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55e8e4a commit febc2b8Copy full SHA for febc2b8
1 file changed
scripts/js/gravity.js
@@ -89,10 +89,11 @@ function parseLines(outputElement, text) {
89
const lines = text.split(/(?=\r)/g);
90
91
for (let line of lines) {
92
+ // Escape HTML to prevent XSS attacks (both in adlist URL and non-domain entries)
93
+ line = utils.escapeHtml(line);
94
if (line[0] === "\r") {
95
// This line starts with the "OVER" sequence. Replace them with "\n" before print
- // we also escape HTML to prevent XSS attacks
- line = utils.escapeHtml(line.replaceAll("\r\u001B[K", "\n").replaceAll("\r", "\n"));
96
+ line = line.replaceAll("\r\u001B[K", "\n").replaceAll("\r", "\n");
97
98
// Last line from the textarea will be overwritten, so we remove it
99
const lastLineIndex = outputElement.innerHTML.lastIndexOf("\n");
0 commit comments