diff options
author | hackademix <giorgio@maone.net> | 2019-03-05 00:58:13 +0100 |
---|---|---|
committer | hackademix <giorgio@maone.net> | 2019-03-05 00:58:13 +0100 |
commit | 3f325cea256c5fd082a1c029d27f63ab93440ba6 (patch) | |
tree | ac2367c1a0a5e967bd83a5760f85c85b65685d08 /html | |
parent | 5d9ab3778bcdb12913333deff64196590688789f (diff) |
Fixed inline whitelisting regressions (issue #35).
Diffstat (limited to 'html')
-rw-r--r-- | html/display_panel/content/main_panel.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js index 022be8c..83c3a6b 100644 --- a/html/display_panel/content/main_panel.js +++ b/html/display_panel/content/main_panel.js @@ -132,9 +132,9 @@ function createList(data, group){ a.href = scriptId.split("(")[0]; if (scriptId.startsWith("view-source:")) { a.target ="LibreJS-ViewSource"; - let source = scriptId.split("\n")[1]; + let source = scriptId.match(/\n([^]*)/); if (source) { - li.querySelector(".source").textContent = decodeURIComponent(source); + li.querySelector(".source").textContent = source[1]; li.querySelector(".toggle-source").style.display = "inline"; } scriptId = scriptId.replace(viewSourceToHuman, "$3 at line $2 of $1"); |