fix: kbd tag show as text

This commit is contained in:
shuai 2022-12-02 17:26:04 +08:00
parent b0c71a9d33
commit 1712a1ab19
1 changed files with 2 additions and 0 deletions

View File

@ -173,6 +173,8 @@ function diffText(newText: string, oldText: string): string {
if (typeof oldText !== 'string') {
return newText
?.replace(/\n/gi, '<br>')
?.replace(/<kbd/gi, '&lt;kbd')
?.replace(/<\/kbd>/gi, '&lt;/kbd&gt;')
?.replace(/<iframe/gi, '&lt;iframe')
?.replace(/<input/gi, '&lt;input');
}