Comment 2 for bug 193622

Revision history for this message
Tzury Bar Yochay (tzury-by) wrote :

 | Looks like it is a bug in markdown.
that is right
 | Can you check, if this bug has been fixed in the latest version of markdown?
No. It is still there

see the following:
>>> import markdown
>>> markdown.version
'1.7'
>>> markdown.markdown('<http://www.google.com>')
u'<p><a href="http://www.google.com">http://www.google.com</a>\n</p>'
>>> markdown.markdown('<https://www.google.com>')
u'<https://www.google.com>'
>>>

I think I will use the offered workaround.

BTW:
A) at jottit.com it works fine.
Aaron, did you guys used this same workaround?

B) I filed a bug out there (http://sourceforge.net/tracker/index.php?func=detail&aid=1897830&group_id=153041&atid=790198)

Thanks again,
Tzury

Here is the workaround.

Add the following to _register_mdx_extensions function in infogami/utils/view.py

    index = md.inlinePatterns.index(markdown.AUTOLINK_PATTERN)
    md.inlinePatterns.insert(index,
markdown.AutolinkPattern(markdown.AUTOLINK_RE.replace('http',
'https')))
    md.inlinePatterns.insert(index,
markdown.AutolinkPattern(markdown.AUTOLINK_RE.replace('http', 'ftp')))