summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Murphy <=>2023-08-21 23:43:01 -0400
committerTyler Murphy <=>2023-08-21 23:43:01 -0400
commit909d47f3316b3593a375bfb52535003c6bc9dd4b (patch)
tree8fc633b048a7f08d0741334e4ec9e013142ea4a9
parentdms (diff)
downloadxssbook-909d47f3316b3593a375bfb52535003c6bc9dd4b.tar.gz
xssbook-909d47f3316b3593a375bfb52535003c6bc9dd4b.tar.bz2
xssbook-909d47f3316b3593a375bfb52535003c6bc9dd4b.zip
fuck you you stupid browsers stop making thing safe >:(
-rw-r--r--public/js/components.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/public/js/components.js b/public/js/components.js
index 38af787..0bf0ed1 100644
--- a/public/js/components.js
+++ b/public/js/components.js
@@ -330,6 +330,13 @@ export function createMultiLineInput(attributes, onSubmit) {
if (event.keyCode == 13 && !event.shiftKey) {
event.preventDefault()
let text = area.innerHTML.trim()
+ .replaceAll("&amp;", '&')
+ .replaceAll("&lt;", '<')
+ .replaceAll("&gt;", '>')
+ .replaceAll("&quot;", '"')
+ .replaceAll("&#39;", "'")
+
+
text = text.replaceAll("\n", "<br>")
if (text.length < 1) return
if (await onSubmit(text)) {