-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
HTML: don't remove http(s) from links #40
Comments
Ah, I see, you want people to use the new rel="external" attribute on anchor elements. IMHO all links containing a domain are to be considered external, what do you think? |
I too had this issue. I serve my sites only over https, and I already specify protocol for links only when sites do not support https, so for my own use I just removed the block of code that deals with this: tillberg@cfaa3ee (I'd be happy to turn that into a PR if desired, but it doesn't seem friendly to just go and create a PR for something that basically just nukes someone else's code :) ) I agree with @Knorkebrot above. I get that there might be some use case for trying to strip the protocol off of pages that include them in self-references (e.g. some heavy server-side application frameworks do this, I think), but that seems like a small benefit to get compared to requiring everyone to mark up their anchors with rel="external" whenever they need to force the link protocol. (I also had never heard of rel="external" before, so I might be biased by my own ignorance.) |
Yes you are right, it's not ideal. I will make changes to keep the protocol. It's a pity because stripping |
Fixed in 3b07a59 on the develop branch. It will be re-enabled in the future when passing options is possible, including the currently used protocol. Either http or https can then be omitted, but not both. |
Please check the |
I'm minifing HTML for a site that's available via HTTPS, but there's a link pointing to a site not supporting HTTPS. Minify removes "http:" from links like this:
Now that link adopts the protocol from the page it's on, in my case HTTPS, which breaks the link.
The text was updated successfully, but these errors were encountered: