Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: timeline title add label escape

shuai559f097926af
diff --git a/ui/src/components/DiffContent/index.tsx b/ui/src/components/DiffContent/index.tsx
index 2a3b3bd9..e784c731 100644
--- a/ui/src/components/DiffContent/index.tsx
+++ b/ui/src/components/DiffContent/index.tsx
@@ -69,7 +69,10 @@ const Index: FC<Props> = ({
{objectType !== 'answer' && opts?.showTitle && (
<h5
dangerouslySetInnerHTML={{
- __html: diffText(newData.title, oldData?.title),
+ __html: diffText(
+ newData.title?.replace(/</gi, '&lt;'),
+ oldData?.title?.replace(/</gi, '&lt;'),
+ ),
}}
className="mb-3"
/>