summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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("&", '&')
+ .replaceAll("&lt;", '<')
+ .replaceAll("&gt;", '>')
+ .replaceAll("&quot;", '"')
+ .replaceAll("&#39;", "'")
+
+
text = text.replaceAll("\n", "<br>")
if (text.length < 1) return
if (await onSubmit(text)) {