Hide Forgot
+++ This bug was initially created as a clone of Bug #1020153 +++ Beaker (http://beaker-project.org) recently started supporting the use of markdown in system note fields. HSS QE discovered that starting a note with a "<" caused a 500 internal server error, and traced it back to this failure in the markdown renderer on RHEL6: Python 2.6.6 (r266:84292, May 27 2013, 05:35:12) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from markdown import markdown >>> markdown('<') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/site-packages/markdown/__init__.py", line 587, in markdown return md.convert(text) File "/usr/lib/python2.6/site-packages/markdown/__init__.py", line 386, in convert self.lines = prep.run(self.lines) File "/usr/lib/python2.6/site-packages/markdown/preprocessors.py", line 128, in run left_tag = self._get_left_tag(block) File "/usr/lib/python2.6/site-packages/markdown/preprocessors.py", line 82, in _get_left_tag return block[1:].replace(">", " ", 1).split()[0].lower() IndexError: list index out of range >>> -bash-4.1$ rpm -qa python-markdown python-markdown-2.0.1-3.1.el6.noarch On Fedora, the more recent version of python-markdown handles this correctly: Python 2.7.3 (default, Aug 9 2012, 17:23:57) [GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from markdown import markdown >>> markdown("<") u'<p><</p>' >>> [ncoghlan@dhcp-41-79 beaker]$ rpm -qa python-markdown python-markdown-2.2.1-1.fc18.noarch The relevant issue and patch appear to be: * https://github.com/waylan/Python-Markdown/issues/70 * https://github.com/waylan/Python-Markdown/commit/07bc7a4c8f2e834e0f8150de004c1f8fd98a3d60
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0773.html