mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
replace text only when text is valid
cc @arturi
This commit is contained in:
parent
9788d26286
commit
985fd62ed6
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ exports.jsonStringify = (data) => {
|
|||
* @param {string} text
|
||||
*/
|
||||
exports.sanitizeHtml = (text) => {
|
||||
return text.replace(/<\/?[^>]+(>|$)/g, '')
|
||||
return text ? text.replace(/<\/?[^>]+(>|$)/g, '') : text
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue