mirror of https://github.com/sveltejs/svelte
fix: repair invalid raw html content during hydration (#8912)
When the HTML that is coming from raw html is invalid, the browser reshuffles things. Bail in that case to try to repair more often. Should help with https://github.com/withastro/astro/issues/7557pull/8911/head
parent
35221c8811
commit
136aebd8eb
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: repair invalid raw html content during hydration
|
@ -0,0 +1,2 @@
|
||||
<p><p>invalid</p></p>
|
||||
<p><p>invalid</p></p>
|
@ -0,0 +1,8 @@
|
||||
<p><!-- HTML_TAG_START --></p>
|
||||
<p>invalid</p>
|
||||
<!-- HTML_TAG_END -->
|
||||
<p></p>
|
||||
<p><!-- HTML_TAG_START --></p>
|
||||
<p>invalid</p>
|
||||
<!-- HTML_TAG_END -->
|
||||
<p></p>
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
export let content;
|
||||
</script>
|
||||
|
||||
<p>{@html content}</p>
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Inner from './inner.svelte';
|
||||
</script>
|
||||
|
||||
<Inner content="<p>invalid</p>" />
|
||||
|
||||
<p>{@html '<p>invalid</p>'}</p>
|
Loading…
Reference in new issue