-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
The new entity escaping in 1.51 introduced a couple of issues:
-
Compiling
<div>'foo'<bar/></div>
results in code that renders&##39;foo&##39;
. There's obviously something going on with the sigil escaping here. Either it never gets unescaped, or it's getting escaped an additional time before getting unescaped. -
Non-top-level
<style>
and<script>
elements (which are useful when using SSR to render an entire document) are rendered back into the document with entities escaped, which breaks a bunch of stuff.
Also an existing problem from before 1.51: Non-top-level <style>
and <script>
elements are parsed as though they were HTML. So e.g. something like <div><script>alert('<>')</script></div>
results in a parse error because Svelte is expecting a tag name in the <>
. The parser should consume until the </script>
when inside a <script>
tag, even if it is not a top-level one.