python-textile
python-textile copied to clipboard
bad em markup in anchor href attribute
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>“>label</a></p>
which not only is wrong, but introduces a run-away attribute value that swallows parts of the page!
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>'
The current version gives this:
<p><a href="<em>link</em>”>label</a></p>
Which is still wrong and gives a syntax error. Textile should not be applied inside html-code.