-
Notifications
You must be signed in to change notification settings - Fork 527
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
Footnotes markup does not pass HTML5 validation #536
Footnotes markup does not pass HTML5 validation #536
Comments
Is there an easy way to override this behavior on a one-off basis to allow validation support before some fix is adopted in the project as a whole? Google just released their AMP pages which will not validate the 'rev' attribute on links. |
This is fixable by overriding the class CustomHTML < Redcarpet::Render::HTML
def footnote_ref(number)
"<sup class='footnote-ref' id='fnref#{number}'><a href='#fn#{number}'>#{number}</a></sup>"
end
end I would also like to say that I'd like to see this fixed. I don't think it should be necessary to create a custom renderer to get valid HTML. |
I just ran into this, getting failed validation due to rel=footnote. This issue doesn't seem to have been addressed in any commits, so I'm wondering is there a plan to remove rel=footnote, or what's the advised 'way forward'? |
Hi everyone, Sorry it's been so long to address such a small issue but this is now solved and will be available in the next version of Redcarpet. Thank you very much ! ❤️ |
The footnotes markup, as generated from html.c, will not pass HTML5 validation because of the following reasons:
rev
attribute is obsolete. (Sources: HTML Living Standard, MDN, Microformats)rel
attribute no longer acceptsfootnote
as a valid value, as it has been dropped in HTML5. (Source: Microformats)Take this sample output from Redcarpet:
When I run it through the (X)HTML5 Nu Validator service, I get the following errors:
The W3C Recommendation for Footnotes is simply to have the anchor links, without any
rel
attribute.I understand that removing this might possibly break functionality for people who are using the
rel
andrev
attributes for CSS selectors, so I wanted to raise this for discussion. Perhaps using class names (as with the<div class='footnotes'>
already generated in Redcarpet output), is more appropriate.The text was updated successfully, but these errors were encountered: