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

Incorrect HTML when using footnotes and smarty-pants together #150

Open
uranusjr opened this issue Feb 15, 2014 · 4 comments
Open

Incorrect HTML when using footnotes and smarty-pants together #150

uranusjr opened this issue Feb 15, 2014 · 4 comments

Comments

@uranusjr
Copy link

    text = """
    foo[^1]

    [^1]: bar
    """
    markdown2.markdown(text, extras={'footnotes', 'smarty-pants'})

Results in

<p>foo<sup class="footnote-ref&#8221; id="fnref-1"><a href="#fn-1">1</a></sup></p>

<div class="footnotes">
<hr />
<ol>
<li id="fn-1">
<p>bar&nbsp;<a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">&#8617;</a></p>
</li>
</ol>
</div>

The quotation mark right before id in the footnote ref is incorrectly converted by smarty-pants to a right quotation mark glyph.

@trmb
Copy link

trmb commented Mar 3, 2014

This looks like it might be the same problem I'm having with smarty-pants and inline html:

markdown2.markdown('<img src="/path/to/img.png" alt="Alt Text">', extras=["smarty-pants"])

Outputs:

u'<p><img src="/path/to/img.png&#8221; alt="Alt Text"></p>\n'

@nicholasserra
Copy link
Collaborator

Thanks for the info and comments doods. We're actively merging fixes and PR's, so if you'd like to contribute a fix, please do so :)

@eugene-eeo
Copy link

Just a (hopefully polite) ping on this issue, when will it be fixed? I need this functionality for my markdown to html thing. I'd be more than glad to try and work on a fix if nobody else is doing so.

@nicholasserra
Copy link
Collaborator

I would say that if you have time to try to contribute a fix for this, please do :)

symroe added a commit to DemocracyClub/python-markdown2 that referenced this issue Dec 10, 2018
symroe added a commit to DemocracyClub/python-markdown2 that referenced this issue Dec 10, 2018
symroe added a commit to DemocracyClub/python-markdown2 that referenced this issue Dec 11, 2018
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

4 participants