-
Notifications
You must be signed in to change notification settings - Fork 4
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
Strips down <i> tag #1
Comments
This is especially an issue with fontawesome, which uses empty < i > tags for icon placement. I thought adding the tag to empty_tags and inline_tags would do the trick, but this has no effect. As a workaround, I add a html comment inside the tags. It gets removed, but tidy still lets the tag itself stay: |
@Ahuahuachi Thanks for the report. I did some research and it seems like this is know problem in the outdated versions of tidy. Apparently the most OS dists like Debian, etc. are using totally outdated versions. I guess updating (meaning self-compiling to a more recent fork) could help in this case. Then there should be an option I believe the only way of making this work for a broad majority would be a dirty workaround with implementing a new fake TAG, introducing this in the |
Can confirm that this is an issue, spent some hours debugging and the lack of an option to not drop empty elements can cause major issues in functionality that is common to modern HTML5-patterns. Lot of frameworks depend on |
@OleVik that's true, sadly. I've managed to compile my own version of php-tidy on my Debian Wheezy. That's a lot more stable and actually respects the settings, that my module is setting (e.g. new-empy-elements). Unfortunately the version that get's shipped with most package maintainers (e.g. apt-get, aptitute) is almost 3 years old and buggy. I guess a solution could be to bound this module to a specific mayor version of php-tidy and only enabled it with prior warning. |
Has there been any progress made on this? I'm having the same problem on one of my sites. |
@jonsparks |
@jonsparks I've merged the changes by @gidlov, can you check if that solves your issue? |
I had the same problem here, and the new option fixes the problem. But it would be nice if it could be released, as the grav plugin manager is still downloading the version from 2016. Thanks. |
Don't know if this is an issue, but if you activate the "strip down comments" option, it also strips down the < i > tag, which I use it for the Font Awesome icons.
The text was updated successfully, but these errors were encountered: