svelte: Bug: "" does not work in JavaScript string
Version
3.5.1
Reproduction Link
https://svelte.dev/repl/0523d3f524974a209df7c43aa087d50d?version=3.5.1
Steps to reproduce
- Put ‘< !-- <script></script> -->’ in JavaScript string
alert("<!-- <script>console.log('Hello')</script> -->");
What is expected?
No error https://jsfiddle.net/jo70b953/
What is actually happening?
Unterminated string constant (2:8)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (13 by maintainers)
@Panya I knew how to avoid this problem this is bug report
@xmeta what’s your real use case for this? It’s supported in an external script if you really want to use this kind of messy stuff. See repl.
This is still not a bug.
You can’t use the character sequence
</script>
anywhere inside a script tag, since it closes the script tag.@Panya Yes, I knew how to avoid this problem
this is bug report