diff options
-rw-r--r-- | src/main/resources/js/fileview.js | 4 | ||||
-rw-r--r-- | src/main/resources/views/fileview.rocker.html | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/main/resources/js/fileview.js b/src/main/resources/js/fileview.js index 039d618..c6b10f2 100644 --- a/src/main/resources/js/fileview.js +++ b/src/main/resources/js/fileview.js @@ -40,13 +40,13 @@ code.addEventListener("change", () => { content.classList.remove("prettyprinted"); content.innerHTML = ""; content.classList.add("linenums"); - content.innerHTML = originalContent; + content.innerText = originalContent; PR.prettyPrint(); } else { content.classList.remove("prettyprinted"); content.innerHTML = ""; content.classList.remove("linenums"); - content.innerHTML = originalContent; + content.innerText = originalContent; PR.prettyPrint(); } }); diff --git a/src/main/resources/views/fileview.rocker.html b/src/main/resources/views/fileview.rocker.html index 087aba7..bef1ad0 100644 --- a/src/main/resources/views/fileview.rocker.html +++ b/src/main/resources/views/fileview.rocker.html @@ -14,7 +14,6 @@ @layout.template("File " + filename, css, js) -> { <button class="switch" id="raw">Show raw</button> <span class="settings" id="settings"> - <!-- TODO: HTML gets executed on linecount option click - why? --> <label for="code">Linecount</label><input id="code" type="checkbox"> <label for="dark">Dark mode</label><input id="dark" type="checkbox"> </span> |