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

md titles are html-rendered with name="" instead of id="" #349

Closed
dascritch opened this issue Aug 21, 2014 · 2 comments
Closed

md titles are html-rendered with name="" instead of id="" #349

dascritch opened this issue Aug 21, 2014 · 2 comments

Comments

@dascritch
Copy link

A section header in markdown is rendered as
h3 > a[name]

To anchor an element in URL, the id attribute must be used

The name attribute is reserved for usage in form elements. Its availability as a id is a heritance from Netscape days and should not have been used here.

Alas, as I read in your README.md, « Note that the id attribute is not whitelisted. »
So how can I patch this ?

@gjtorikian
Copy link
Contributor

Hi @dascritch! Thanks for the report. You're talking about the anchor links on every Markdown page, right?

This is one of those weird cases where the rendering is not handled by this library, but actually by html-pipeline, which we also use 1.

Here's the TOC filter: https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/toc_filter.rb

I suggest opening a report there, and/or making a PR to swap the name for id.

Cheers!

@dascritch
Copy link
Author

Yes true !
Thanks ! I'll report to them.

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