What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

I was answering this question and was trying to post following url in comments but everytime it failed -

http://blogs.microsoft.co.il/blogs/tomershamam/archive/2007/05/25/Compiled-XAML-3D00-BAML-not-IL.aspx

I searched on Meta and came across this post and tried the solution posted but url is already encoded and doesn't work.

Is there a way to make this work in comments?

share|improve this question
2  
What we need here is a [status-official-feature] –  Marc Gravell Jul 6 '12 at 12:29
add comment

3 Answers 3

up vote 6 down vote accepted

Yes, we probably shouldn't be applying _blah_ => <i>blah</i> inside links... especially in the full [foo](bar) format which is our usual "if there's problems, do it this way" fallback. I'm not sure if escaping _ as \_ is the best option here, as it feels to me "broken" as-is, and if we fix it, your links will stop working. A better option might be to use %5f for _, i.e.

http://blogs.microsoft.co.il/blogs/tomershamam/archive/2007/05/25/Compiled-XAML-%5f3D00%5f-BAML-not-IL.aspx

share|improve this answer
    
Just to prove that works in comments, either directly: blogs.microsoft.co.il/blogs/tomershamam/archive/2007/05/25/… or as a formal link –  Marc Gravell Jul 6 '12 at 12:24
    
Thanks Marc, both solutions work. –  akjoshi Jul 6 '12 at 16:52
add comment

I agree that this is a bug, since it's inconsistent with the real in-post Markdown. Unfortunately given how the highly optimized comment MarkdownMini implementation works, it would require a huge change to make this behave as expected, and given the edge case-iness of this, I don't think this issue alone warrants the amount of work at the moment. So for the time being, I have to decline this.

As others have mentioned, the two ways to work around this are URL-encoding the underscore as %5f, or escaping it as \_. I have done the latter in your comment, so at least that link works now.

share|improve this answer
    
Thanks balpha, I agree with you; specially when a simple workaround is available these corner cases doesn't justify big changes. –  akjoshi Jul 6 '12 at 16:51
    
This also breaks video rendering for in-post html. It took three of us several tries to get this video to properly render, and the only way was to encode the underscores, which is crap because URLs aren't even supposed to use encoded stuff. Also italics aren't even parsed inside words...why are they parsed inside URLs? Also escaping the underscores works in preview but not rendered output, vice versa for encoding. So crazy all around. –  Ben Brocka Sep 26 '12 at 13:50
add comment

Underscores are Markdown syntax for italics. In comments, you have two options:

  1. If you escape the underscores with backslashes, the URL will be treated correctly:

    http://blogs.microsoft.co.il/blogs/tomershamam/archive/2007/05/25/Compiled-XAML-\_3D00\_-BAML-not-IL.aspx
    
  2. If you use Markdown syntax for links, there should be no problem:

    [Compiled XAML = BAML not IL](http://blogs.microsoft.co.il/blogs/tomershamam/archive/2007/05/25/Compiled-XAML-_3D00_-BAML-not-IL.aspx)
    

    However, this does not work. It replaces the underscores with <i> and </i> tags.

    Right now, you have to use a workaround (like escaping the underscores).

share|improve this answer
    
1  
Method 2: Compiled XAML = BAML not IL –  Dennis Jul 6 '12 at 12:18
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .