Skip to content

Commit 85ccc1c

Browse files
authored
Use encodeURI instead of escapeHTML since the src is url (#14)
* Use encodeURI instead of escapeHTML since the src is url * added changeset
1 parent e062e6e commit 85ccc1c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.changeset/cool-rivers-write.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'rich-text-svelte-renderer': patch
3+
---
4+
5+
iFrame src issue: replaced escapeHTML with encodeURI

src/lib/Elements/IFrame.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { escapeHTML } from 'es-escape-html';
3-
42
interface Props {
53
url?: string;
64
title?: string;
@@ -23,7 +21,7 @@
2321
style:left="0"
2422
style:width="100%"
2523
style:height="100%"
26-
src={escapeHTML(url)}
24+
src={encodeURI(url)}
2725
loading="lazy"
2826
allow="fullscreen"
2927
frameBorder="0"

0 commit comments

Comments
 (0)