Merge branch 'feat/ui-0.5.0' into 'test'

fix: review kbd cannot render as tag

See merge request opensource/answer!308
This commit is contained in:
Li Shuailing 2022-12-02 07:32:02 +00:00
commit 440f58f6d5
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');
}