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

Some characters are escaped twice #276

Closed
krummler opened this issue Nov 13, 2018 · 2 comments
Closed

Some characters are escaped twice #276

krummler opened this issue Nov 13, 2018 · 2 comments

Comments

@krummler
Copy link

First off, thanks for this great library!

What did you expect to happen?

I expect characters to be rendered like their unescaped counterparts, for example:

  • & becomes &
  • " becomes "
  • &lt; becomes <

What happened instead?

Most characters seem to work fine, except for &gt; and &lt; (maybe there are more cases).

  • &amp; stays &amp; which renders as &
  • &quot; stays &quot; which renders as "
  • &lt; becomes &amp;lt; which renders as &lt;
  • &gt; becomes &amp;gt; which renders as &gt;

Example

&amp; Hello\n\n&quot; Hai\n\n&lt; Does that work\n\n&gt; Maybe

Becomes:

"<p>&amp; Hello</p>\n<p>&quot; Hai</p>\n<p>&amp;lt; Does that work</p>\n<p>&amp;gt; Maybe</p>\n"
@jgm
Copy link
Member

jgm commented Nov 13, 2018

I can't reproduce this:

 % ./cmark
&amp; Hello\n\n&quot; Hai\n\n&lt; Does that work\n\n&gt; Maybe
^D
<p>&amp; Hello\n\n&quot; Hai\n\n&lt; Does that work\n\n&gt; Maybe</p>

What version are you using? (I see from the linked issue 0.28.3. Well, this is with the 0.28.3 release.) I suspect the problem is not actually in cmark.

@jgm
Copy link
Member

jgm commented Feb 23, 2019

Closing unless more information can be provided that would allow me to reproduce this.

@jgm jgm closed this as completed Feb 23, 2019
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