-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only escape attribute values for elements, not components (#9456)
* only escape attribute values for elements, not components - closes #9454 * changeset --------- Co-authored-by: Rich Harris <[email protected]>
- Loading branch information
1 parent
9abfb52
commit 6f6c3a0
Showing
5 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: only escape attribute values for elements, not components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/svelte/tests/runtime-runes/samples/component-prop-unescaped/Child.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script> | ||
const { prop } = $props(); | ||
</script> | ||
|
||
{prop} |
5 changes: 5 additions & 0 deletions
5
packages/svelte/tests/runtime-runes/samples/component-prop-unescaped/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { test } from '../../test'; | ||
|
||
export default test({ | ||
html: `"` | ||
}); |
5 changes: 5 additions & 0 deletions
5
packages/svelte/tests/runtime-runes/samples/component-prop-unescaped/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script> | ||
import Child from './Child.svelte'; | ||
</script> | ||
|
||
<Child prop='"'/> |
6f6c3a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
svelte-5-preview – ./sites/svelte-5-preview
svelte-octane.vercel.app
svelte-5-preview.vercel.app
svelte-5-preview-svelte.vercel.app
svelte-5-preview-git-main-svelte.vercel.app