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

Entities inside autolinks not recognized #263

Open
xiaq opened this issue Oct 3, 2022 · 3 comments
Open

Entities inside autolinks not recognized #263

xiaq opened this issue Oct 3, 2022 · 3 comments

Comments

@xiaq
Copy link

xiaq commented Oct 3, 2022

https://spec.commonmark.org/0.30/#entity-and-numeric-character-references implies that only code spans and code blocks don't support entities.

However, the dingus doesn't support entities in autolinks either; the following

<http://&gt;>

is converted to

<p><a href="http://&amp;gt;">http://&amp;gt;</a></p>

(Dingus permalink: https://spec.commonmark.org/dingus/?text=%26gt%3B)

The & inside the autolink is recognized as a literal ampersand rather than the starter of an entity.

I'm inclined to think this is a bug of the dingus implementation but the dingus page itself doesn't say which implementation is behind it, so I'm filing it here. Please move it to the proper tracker if that is indeed the case.

@jgm
Copy link
Member

jgm commented Oct 3, 2022

Yes, this is a bug in commonmark/commonmark.js

@jgm jgm transferred this issue from commonmark/commonmark-spec Oct 3, 2022
@jgm
Copy link
Member

jgm commented Oct 3, 2022

cmark gives the correct output:

<p><a href="http://%3E">http://&gt;</a></p>

I'm transferring the issue; it's a bug in commonmark.js.

@xiaq xiaq changed the title Are entities supported inside autolinks? Entities inside autolinks not recognized Oct 3, 2022
@xiaq
Copy link
Author

xiaq commented Oct 3, 2022

Thanks, reworded the title to reflect that this is a bug.

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