Fix input details

This commit is contained in:
barsdeveloper
2022-05-08 20:21:37 +02:00
parent 59eaa57217
commit 3c643f0c6a
7 changed files with 214 additions and 108 deletions

View File

@@ -166,7 +166,6 @@ export default class Utility {
return value
.replace(/\n$/, "") // Remove trailing newline
.replaceAll("\u00A0", " ") // Replace special space symbol
.replaceAll("\r\n", String.raw`\r\n`) // Replace newline with \r\n
.replaceAll("\n", String.raw`\r\n`) // Replace newline with \r\n
}
@@ -175,8 +174,7 @@ export default class Utility {
*/
static decodeInputString(value) {
return value
.replaceAll(" ", "\u00A0") // Replace special space symbol
.replaceAll(String.raw`\r\n`, "<br />\n") // Replace newline with \r\n
.replaceAll("\\r\n", "\n") // Replace newline with \r\n
}
/**