Bug 1048509

Summary: Markdown links with : are broken
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-markdownAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: rnovacek, thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-08 16:40:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miro Hrončok 2014-01-04 19:03:55 UTC
Description of problem:
While markdown links in descriptions generally work, if the URL contains colon, the link changes to empty string.

Steps to Reproduce:
1. Put a link with colon in the description (using the markdown syntax)
   such as [Miro](https://fedoraproject.org/wiki/User:Churchyard)

Actual results:
<a href="">Miro</a>

Expected results:
<a href="https://fedoraproject.org/wiki/User:Churchyard">Miro</a>

Additional info: see http://copr.fedoraproject.org/coprs/churchyard/chromium-russianfedora/ for real life example

(I've tested by experimenting, that the colon is the thing that breaks the link, other characters might do the same thing.)

Comment 1 Miroslav Suchý 2014-01-08 15:57:22 UTC
This is problem of python-markdown.

Reproducer:
>>> import markdown
>>> md = markdown.Markdown(safe_mode='replace',
...                    html_replacement_text='--RAW HTML NOT ALLOWED--')
>>> text = "[Miro](https://fedoraproject.org/wiki/User:Churchyard)"
>>> md.convert(text)
u'<p><a href="">Miro</a></p>'

rpm -q python-markdown
python-markdown-2.3.1-3.fc20.noarch

Comment 2 Thomas Moschny 2014-01-08 16:40:07 UTC
Upstream says this behavior is intentional: See https://github.com/waylan/Python-Markdown/issues/220