We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
When portions of markup are turned into HTML, attributes with interpolated literals (insofar as that's not an oxymoron) contain unwanted commas
To Reproduce
<div> <span class="a/{42}"/> </div>
This needs to be compiled in production mode, since elements are never converted to static HTML in dev mode.
https://svelte.dev/repl/bf37bbf244594248b444a50ad3b95c73?version=3.6.10
Expected behavior
The chunks of the attribute should be concatenated without commas
Severity
Low, since attributes with interpolated literals are somewhat rare.
Additional context
In a case like this...
<script> const answer = 42; </script> <div> <span class="a/{answer}"/> </div>
...Svelte should recognise that answer cannot change, and so it's ok to use innerHTML:
answer
-span = element("span"); -attr(span, "class", span_class_value = "a/" + answer); +div.innerHTML = `<span class="a/${answer}"></span>`; // ... -append(div0, span);
The text was updated successfully, but these errors were encountered:
prevent commas in attributes - fixes #3341
a03566e
Merge pull request #3342 from sveltejs/gh-3341
bc5aca0
prevent commas in attributes
Successfully merging a pull request may close this issue.
Describe the bug
When portions of markup are turned into HTML, attributes with interpolated literals (insofar as that's not an oxymoron) contain unwanted commas
To Reproduce
This needs to be compiled in production mode, since elements are never converted to static HTML in dev mode.
https://svelte.dev/repl/bf37bbf244594248b444a50ad3b95c73?version=3.6.10
Expected behavior
The chunks of the attribute should be concatenated without commas
Severity
Low, since attributes with interpolated literals are somewhat rare.
Additional context
In a case like this...
...Svelte should recognise that
answer
cannot change, and so it's ok to use innerHTML:The text was updated successfully, but these errors were encountered: