mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2025-12-09 20:19:32 +02:00
set replace " to \" and newline to "\\n"
This commit is contained in:
@@ -12,9 +12,9 @@ function updateAnnotation(value) {
|
||||
function sendArticleData () {
|
||||
let melon = document.cookie.split(';')[0].replace("melon=", "");
|
||||
let body = `{
|
||||
title: "${$("#titleInput").val()}",
|
||||
annotation: "${$("#annotationArea").val()}",
|
||||
text: "${$("#textArea").val()}",
|
||||
title: "${$("#titleInput").val().replace(/"/g, '\\"') }",
|
||||
annotation: "${$("#annotationArea").val().replace(/\t/g, '\r\n').replace(/"/g, '\\"') }",
|
||||
text: "${$("#textArea").val().replace(/\t/g, '\r\n').replace(/"/g, '\\"') }",
|
||||
image: "${$("#imgInput").val()}",
|
||||
author: "${melon}"
|
||||
}`
|
||||
|
||||
Reference in New Issue
Block a user