fix: review kbd cannot render as tag

This commit is contained in:
shuai 2022-12-02 15:24:04 +08:00
parent df79e4b8a0
commit 583bd34f1c
2 changed files with 5 additions and 1 deletions

View File

@ -135,7 +135,9 @@ const Index: FC = () => {
<Col lg={{ span: 7, offset: 1 }}>
<Alert variant="secondary">
<Stack className="align-items-start">
<span className="badge text-bg-secondary">{editBadge}</span>
<span className="badge text-bg-secondary mb-2">
{editBadge}
</span>
<Link to={itemLink} target="_blank">
{itemTitle}
</Link>

View File

@ -190,6 +190,8 @@ function diffText(newText: string, oldText: string): string {
return result
.join('')
?.replace(/<iframe/gi, '&lt;iframe')
?.replace(/<kbd/gi, '&lt;kbd')
?.replace(/<\/kbd>/gi, '&lt;/kbd&gt;')
?.replace(/<input/gi, '&lt;input');
}