clld / glottolog3

glottolog2 re-implemented as CLLD app
MIT License
114 stars 27 forks source link

Escape text before it is rendered as markdown #120

Closed xrotwang closed 5 years ago

xrotwang commented 5 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>"