mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-17 05:47:34 +08:00
New templates, node advanced display, style fixes
This commit is contained in:
@@ -149,13 +149,22 @@ export default class Utility {
|
||||
/**
|
||||
* @param {String} value
|
||||
*/
|
||||
static sanitizeInputString(value) {
|
||||
static sanitizeString(value, input = false) {
|
||||
return value
|
||||
.replace(/\n$/, "") // Remove trailing newline
|
||||
.replaceAll("\u00A0", " ") // Replace special space symbol
|
||||
.replaceAll("\n", String.raw`\r\n`) // Replace newline with \r\n
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} value
|
||||
*/
|
||||
static renderInputString(value) {
|
||||
return value
|
||||
.replaceAll(" ", "\u00A0") // Replace special space symbol
|
||||
.replaceAll(String.raw`\r\n`, "<br />\n") // Replace newline with \r\n
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} value
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user