clld / glottolog3

glottolog2 re-implemented as CLLD app
MIT License
108 stars 25 forks source link

Escape text before it is rendered as markdown #120

Closed xrotwang closed 4 years ago

xrotwang commented 4 years ago

Currently, hh_ethnologue_comment is rendered as markdown. This creates formatting issues when two quotes using `` are present:

>>> from markdown import markdown
>>> markdown('``abc')
'<p>``abc</p>'
>>> markdown("``abc'' and ``cde''")
"<p><code>abc'' and</code>cde''</p>"