mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-27 10:44:43 +08:00
Update default value for string input
This commit is contained in:
@@ -139,4 +139,14 @@ export default class Utility {
|
||||
}
|
||||
return [...(new Set(result.concat(...a, ...b)))]
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} value
|
||||
*/
|
||||
static sanitizeInputString(value) {
|
||||
return value
|
||||
.replace(/\n$/, "") // Remove trailing newline
|
||||
.replaceAll("\u00A0", " ") // Replace special space symbol
|
||||
.replaceAll("\n", "\\r\\n") // Replace newline with \r\n
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user