mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-27 10:44:43 +08:00
Various fixes and refactoring
This commit is contained in:
@@ -11,10 +11,7 @@ const tagReplacement = {
|
||||
}
|
||||
|
||||
function sanitizeText(value) {
|
||||
if (value.constructor === String) {
|
||||
return value.replace(/[&<>'"]/g, tag => tagReplacement[tag])
|
||||
}
|
||||
return value
|
||||
return value.toString().replace(/[&<>'"]/g, tag => tagReplacement[tag])
|
||||
}
|
||||
|
||||
export default sanitizeText
|
||||
|
||||
Reference in New Issue
Block a user