Issue #6531 wontfix

Textile README is showing < and > characters as &#60; and &#62; in bq. blocks

Alex Honeywell
created an issue

Reproducible with:

bc. [ { "regex": "<pattern>", "action": "<action>"[, "<argument>": "<value>"[, ...] ] }[, ...] ]

Comments (2)

  1. Michael Frauenholtz staff

    It looks like this is a bug with our textile parser. It parses the text multiple times. On the first pass, it escapes < to &#60;, and on the second pass, it escapes the ampersand to form &amp;#60;.

    We use this package for our textile parsing, but you can see it has not been updated in some time. It looks like this repository may be the new home for the project, although there have only been a handful of commits over the last 2 years.

    Here is the output from my python shell using the latest version:

    >>> s
    "bc. <script>alert('hi');</script>"
    >>> textile.textile_restricted(s, lite=False)
    '<pre><code>&#38;#60;script&#38;#62;alert(&#39;hi&#39;);&#38;#60;/script&#38;#62;\n</code></pre>'
    

    Unfortunately we don't a fix for this, but if one of those packages gets updated, we should be able to start using that.

    Cheers, Michael

  2. Log in to comment