Skip to content

Commit 97c1b16

Browse files
authored
Merge pull request ninenine#40 from NodeBB-Community/master
fix: dont crash if content is not string
2 parents e3121b3 + 0b1ff76 commit 97c1b16

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/parseContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function parseContent(content, banned_words, banned_urls, censorWholeWord, symbo
2828
}
2929

3030
var replacement = censorWholeWord ? '[censored]' : censor;
31-
return content
31+
return String(content)
3232
.replace(banned_words, replacement)
3333
.replace(banned_urls, '[link removed]');
3434
}

0 commit comments

Comments
 (0)