Bug 1048509 - Markdown links with : are broken
Summary: Markdown links with : are broken
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-markdown
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Moschny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2014-01-08 16:40:07 UTC
Type: Bug
Embargoed:


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.

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


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