[Bug]: removeAttributeQuotes cause WhatsApp to not load open-graph images
What happened?
Using the removeAttributeQuotes, Open Graph (og:image) tags' attribute values without quotes prevent WhatsApp from loading preview images
Before minification (works as expected):
<meta property="og:image" content="https://example.com/image.jpg">
After minification with removeAttributeQuotes (breaks WhatsApp preview):
<meta property=og:image content=https://example.com/image.jpg>
I don't think this bug would impact many users, but a warning in the README file would be helpful to inform developers of this potential issue when using removeAttributeQuotes with Open Graph tags.
Version
v7.2.0
What browsers are you seeing the problem on?
No response
Link to reproduce
No response
Relevant log output
No response
Willing to submit a PR?
No
http://perfectionkills.com/experimenting-with-html-minifier/#remove_attribute_quotes
Please, use this optimization with care.
To me it looks like valid HTML:
Browsers interpret the input like this:
For me it seems this is a bug in WhatsApp. If this is a problem, do not use removeAttributeQuotes.