fuck you you stupid browsers stop making thing safe >:(
This commit is contained in:
parent
c4c26f42b6
commit
909d47f331
1 changed files with 7 additions and 0 deletions
|
@ -330,6 +330,13 @@ export function createMultiLineInput(attributes, onSubmit) {
|
||||||
if (event.keyCode == 13 && !event.shiftKey) {
|
if (event.keyCode == 13 && !event.shiftKey) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
let text = area.innerHTML.trim()
|
let text = area.innerHTML.trim()
|
||||||
|
.replaceAll("&", '&')
|
||||||
|
.replaceAll("<", '<')
|
||||||
|
.replaceAll(">", '>')
|
||||||
|
.replaceAll(""", '"')
|
||||||
|
.replaceAll("'", "'")
|
||||||
|
|
||||||
|
|
||||||
text = text.replaceAll("\n", "<br>")
|
text = text.replaceAll("\n", "<br>")
|
||||||
if (text.length < 1) return
|
if (text.length < 1) return
|
||||||
if (await onSubmit(text)) {
|
if (await onSubmit(text)) {
|
||||||
|
|
Loading…
Reference in a new issue