Removing the quotes around attribute values can cause cryptic errors in lit-html templates (and, I suspect, other string-literal based templating systems).
In particular, an attribute value with bindings like this:
<a href="/details/${category}/${item}">
This value doesn't get parsed correctly by lit-html if the quotes are removed. After processing, we end up with an HTML comment wrapped around the second bound value, like this:
<a href=/details/candy/<!-- Swedish+Fish -->>
I ended up setting the removeAttributeQuotes option to false to prevent this issue, but it seems like it might be a good default:
Update: I realized that this option is actually off by default in html-minifier (and there's a note saying to use it with care). So, coming down stronger on the side that this should be off by default.
Removing the quotes around attribute values can cause cryptic errors in lit-html templates (and, I suspect, other string-literal based templating systems).
In particular, an attribute value with bindings like this:
<a href="/details/${category}/${item}">
This value doesn't get parsed correctly by lit-html if the quotes are removed. After processing, we end up with an HTML comment wrapped around the second bound value, like this:
<a href=/details/candy/<!-- Swedish+Fish -->>
I ended up setting the
removeAttributeQuotes
option tofalse
to prevent this issue, but it seems like it might be a good default: