#3676 URLs in Ask Fedora trim out underscores
Closed: Fixed None Opened 11 years ago by ryanlerch.

When writing an answer in askbot if you include a URL with underscores, it strips them out of the Text (the url= attribute keeps them).

For example, if you include a post with a url either way:

http://fedoraproject.org/wiki/Getting_started_with_OpenStack_on_Fedora_17

or

http://fedoraproject.org/wiki/Getting_started_with_OpenStack_on_Fedora_17

it creates the following html output:
http://fedoraproject.org/wiki/Getting_started_with_OpenStack_on_Fedora_17">http://fedoraproject.org/wiki/GettingstartedwithOpenStackonFedora17

It seems the emphasis code is being applied to URLS :(


This looks to be a python-markdown2 issue:

http://code.google.com/p/python-markdown2/issues/detail?id=38

Or perhaps in the way askbot uses python-markdown2.

This seems to be due to our settings.

"Enabling code-friendly mark down" in https://ask.fedoraproject.org/settings/MARKUP/ appears to fix the issue. Enabled on both production and staging now.

{{{
If checked, underscore characters will not trigger italic or bold formatting - bold and italic text can
still be marked up with asterisks. Note that "MathJax support" implicitly turns this feature on, because
underscores are heavily used in LaTeX input.
}}}

I haven't enabled LaTeX input since we don't use it so much on the forum.

Login to comment on this ticket.

Metadata