Skip to content

Commit 9a327dc

Browse files
committed
fix: only allow http link in iframe render
1 parent c1365f2 commit 9a327dc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

client/web/src/components/Markdown/render.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ export const Markdown: React.FC<{
4747
iframe: (props) => {
4848
let src = props.src;
4949

50-
if (src?.includes('javascript')) {
51-
return <div>not support run javascript</div>;
50+
if (!src) {
51+
return <div />;
52+
}
53+
54+
if (!src.startsWith('http')) {
55+
return <div>only support http source</div>;
5256
}
5357

5458
if (src && src.includes('?')) {

0 commit comments

Comments
 (0)