Opened 13 years ago
Closed 12 years ago
#425 closed defect (fixed)
Markdown Links in media description broken for media/dokuwiki targets
Reported by: | chrono | Owned by: | Jakob Kramer |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: |
Description
Links to media- or dokuwiki pages are broken when using markdown syntax and turn out empty, probably due to the ":" namespace separator.
Reproduce Example:
markdown in description field:
[Odyssey](https://apollo.open-resource.org/mission:tech:odyssey)
turns into:
<p><a href="">Odyssey</a> </p>
As there currently is no other way to place links for more information, I would consider it a major defect :)
Change History (12)
comment:1 by , 13 years ago
follow-up: 3 comment:2 by , 12 years ago
Component: | component1 → programming |
---|
I wonder if this is a python-markdown issue or a lxml.html.clean() issue?
comment:4 by , 12 years ago
Markdown 2.2.0 came out but things still seem broken on this... not sure what next steps are.
I checked... this isn't our cleaning utility, it's markdown itself:
cwebber@grumps:~/devel/mediagoblin$ ./bin/python Python 2.7.3rc2 (default, Apr 22 2012, 22:35:38) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from mediagoblin.tools.text import MARKDOWN_INSTANCE >>> MARKDOWN_INSTANCE.convert("[Odyssey](https://apollo.open-resource.org/mission:tech:odyssey)") u'<p><a href="">Odyssey</a></p>' >>> import markdown >>> markdown.__file__ '/home/cwebber/devel/mediagoblin/local/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/__init__.pyc' >>> markdown.Markdown().convert("[Odyssey](https://apollo.open-resource.org/mission:tech:odyssey)") u'<p><a href="https://apollo.open-resource.org/mission:tech:odyssey">Odyssey</a></p>' >>>
This is sad but I'm going to declare it not a mediagoblin bug unless someone else seriously objects. What it looks like is happening is that turning on safe mode means that it breaks links with colons in them. I'm not sure how to fix that, but I think turning off safe mode is a bad idea?
If we really think this is safe, maybe a patch to markdown upstream is proper to declare colons to be safe?
comment:5 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Marking as wontfix because I think it should be updated on markdown's end.
comment:6 by , 12 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Optionally we could stop using markdown's cleaning pass because we already doing it via lxml.html.clean, but I'm not sure that's a good idea?
Reopening. If someone wants to look into the way markdown's clenaing works and compare it to what we're already doing via lxml.html.clean, that would be interesting to know.
comment:8 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Alright, I'm content to close this then.
comment:9 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
We still have to fix it. Just disable python-markdown’s "safe mode."
comment:12 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The development version of “Python-Markdown” supports colons in
href
s already.