-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
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
Double quotes within single quoted attributes cause invalid output #275
Comments
I can confirm. It's especially problematic with data attributes containing values like JSON etc.
becomes
|
This behavior is caused by |
This is still open and I was wondering if there was a solution to this? As far as I know, it's not possible to pass the |
@sergeiliski: Can you check if your issue still exists with the prerelease version of critical We have replaced |
I faced this problem too, with the stable version. With the next version this problem has gone. |
Swapping
'
for"
in something like<a title='My Title Here'></a>
isn't usually a problem, however, it is valid HTML to have something like<a title='Read more "Double Quotes around me"'></a>
.Critical does something strange in these cases (even with
minify: false
). It'll take the above HTML and output:<a title="Read more " double="" quotes="" around="" me=""=""></a>
Which obviously isn't right.
Additionally, and likely related, if the input HTML is:
<a href=/link></a>
I expect the HTML output to be exactly<a href=/link></a>
. critical is currently adding in double quotes around all attributes values, i.e.,<a href="/link"></a>
.My options are:
{inline: true, minify: false}
Let me know if you need anything else.
The text was updated successfully, but these errors were encountered: