Skip to content
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

Whitespace in <a rel=""> is not trimmed #436

Closed
geekman opened this issue Sep 5, 2021 · 2 comments
Closed

Whitespace in <a rel=""> is not trimmed #436

geekman opened this issue Sep 5, 2021 · 2 comments

Comments

@geekman
Copy link

geekman commented Sep 5, 2021

Tested with v2.9.21.

$ echo '<a href=# rel="noopener ">link</a>' | ./minify --mime text/html
<a href=# rel="noopener ">link</a>
                       ^

rel should be a set of space-separated keywords, so I believe whitespace can be stripped here.

I have taken a quick look through the HTML test cases, which leads me to believe that not all whitespace in all attributes are trimmed.

@tdewolff
Copy link
Owner

tdewolff commented Sep 7, 2021

Good find, this would be a great feature to add, I'll look into it!

@tdewolff
Copy link
Owner

tdewolff commented Sep 8, 2021

I've added this feature, let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants