fuck you you stupid browsers stop making thing safe >:(

This commit is contained in:
Tyler Murphy 2023-08-21 23:43:01 -04:00
parent c4c26f42b6
commit 909d47f331

View file

@ -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)) {