sebix / python-textile

A Python port of Textile, A humane web text generator
https://github.com/textile/python-textile/
Other
62 stars 43 forks source link

bad em markup in anchor href attribute #2

Open automatist opened 13 years ago

automatist commented 13 years ago

Generally I like how textile let's HTML pass through, but I recently came across a problem along the lines of the following:

import textile
print textile.textile("""<a href="_link_">label</a>""")

from which python-textile 2.1.5 produces:

<p><a href="<em>link</em>&#8220;>label</a></p>

which not only is wrong, but introduces a run-away attribute value that swallows parts of the page!

sebix commented 12 years ago

Should this be combination of single- and double-quotes? With 3 double-quotes (as its displayed here on GH) the text is parsed as simple paragraph:

'\t<p>label</p>'
sebix commented 8 years ago

The current version gives this:

<p><a href="<em>link</em>&#8221;>label</a></p>

Which is still wrong and gives a syntax error. Textile should not be applied inside html-code.