mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-08-29 01:53:47 +08:00
fix: remove dangerouslySetInnerHTML
This commit is contained in:
@@ -102,7 +102,7 @@ const QqFactDescription = ({ data }: { data: any }) => {
|
||||
</ol>
|
||||
</>
|
||||
) : null}
|
||||
{data.content ? <div class="dangerouslySet">{raw(data.content)}</div> : null}
|
||||
{data.content ? <div>{raw(data.content)}</div> : null}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { raw } from 'hono/html';
|
||||
|
||||
import type { ImageData } from './util';
|
||||
|
||||
function zaobao({ imageDataArray, articleBody }) {
|
||||
@@ -5,7 +7,7 @@ function zaobao({ imageDataArray, articleBody }) {
|
||||
<>
|
||||
{imageDataArray.map((imageData: ImageData) =>
|
||||
imageData.type === 'normalHTML' ? (
|
||||
<div dangerouslySetInnerHTML={{ __html: imageData.html }} />
|
||||
<div>{raw(imageData.html)}</div>
|
||||
) : (
|
||||
imageData.type === 'data' && (
|
||||
<figure>
|
||||
@@ -15,7 +17,7 @@ function zaobao({ imageDataArray, articleBody }) {
|
||||
)
|
||||
)
|
||||
)}
|
||||
{articleBody && <div dangerouslySetInnerHTML={{ __html: articleBody }} />}
|
||||
{articleBody && <div>{raw(articleBody)}</div>}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user