feat: in case of no html, dont mutate
This commit is contained in:
parent
f077d99049
commit
4907bb3572
|
|
@ -134,6 +134,10 @@ export const stripHtmlValidation = (
|
|||
value: string,
|
||||
replaceBold = false
|
||||
): string => {
|
||||
if (value.indexOf("<p>") === -1) {
|
||||
return value;
|
||||
}
|
||||
|
||||
const html = (value || '')
|
||||
.replace(/ /gi, ' ')
|
||||
.replace(/^<p[^>]*>/i, '')
|
||||
|
|
|
|||
Loading…
Reference in New Issue