Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1048509 - Markdown links with : are broken
Summary: Markdown links with : are broken
Alias: None
Product: Fedora
Classification: Fedora
Component: python-markdown
Version: 20
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Thomas Moschny
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-01-04 19:03 UTC by Miro Hrončok
Modified: 2014-01-08 16:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-01-08 16:40:07 UTC
Type: Bug

Attachments (Terms of Use)

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.

>>> 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

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

Note You need to log in before you can comment on or make changes to this bug.