Link in message is broken but URL looks OK

Discussion in 'Site and Forum Feedback' started by FloatingBones, Jan 31, 2012.

  1. macrumors 65816

    FloatingBones

    Joined:
    Jul 19, 2006
    #1
    In this message, the link the poster provided gets a 404 error. The link has a gratuitous space at its end.

    However, when I start drafting a reply with the quote button, the URL I see in the quoted reply is correct: no trailing space. I copy and paste the URL from the message and I get to the page the poster intended.

    Am I missing something?
     
  2. macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #2
    Try this: http://www.bloomberg.com/news/2012-...hing-case-will-go-forward-u-s-judge-says.html

    The poster had %22/ at the end of the link, which made it not work.

    When you quoted the post, the trailing space was dropped.
     
  3. FloatingBones, Jan 31, 2012
    Last edited: Jan 31, 2012

    thread starter macrumors 65816

    FloatingBones

    Joined:
    Jul 19, 2006
    #3
    I was already able to find the article.

    My question is why the link is fubar but quoting the article shows the correct URL.

    That's the question: why was the quoted URL different from the URL in the message?

    Test: putting the link with a leading trailing space in it here.
     
  4. Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #4
    When I quote the post with the bad URL, I get exactly the same bad URL.

    Somebody who notices a bad URL is welcome to fix it when quoting the post.
     
  5. FloatingBones, Jan 31, 2012
    Last edited: Jan 31, 2012

    thread starter macrumors 65816

    FloatingBones

    Joined:
    Jul 19, 2006
    #5
    That's what's confusing me: when I quote the post with the bad URL, the URL string no longer has the trailing space. You seem to be seeing a different result than I am. :confused:

    Here is what the edit box looks like immediately after I hit the quote button on the message in question:

    [​IMG]

    Note: the URL has been changed: no trailing space.
     
  6. macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    #6
    %22 is a URL-encoded quotation mark. The forum software probably saw it as extraneous punctuation when you quoted the post and trimmed it off. Apparently the same check wasn't made when it was originally posted.
     
  7. Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #7
    The %22 is not trimmed off. It's just shown in its more natural form: a double quote mark.

    According to the rules of URLs, certain punctuation characters in URLs have to be represented in the %xx syntax, where xx is the hex value of the character. Decimal 22 is the value of the ASCII double quote character, so %22 is the URL syntax for a double quote character.

    The extra trailing " in sazivad's post is shown as %22 in the resulting URL. When you quote the post you see the " syntax. It's the same character, shown two ways. If you view the bad post and hover over the link you'll see %22 in the URL. If you quote the post you'll see " in its place. But if you preview the post with the quote (or post it) you'll once again see the %22 form.

    It's the same idea as seeing [b]hello[/b] while editing a post and hello when you make the post. Same information in two syntaxes.

    I'll mention, while hoping not to confuse things further, that you can write a URL in a post as either
    [url=http://www.macrumors.com]MacRumors[/url] <--- no quote marks​
    or
    [url="http://www.macrumors.com"]MacRumors[/url] <--- matching quote marks​
    but if you include only one of the two double quote marks your post will be broken.
     
  8. thread starter macrumors 65816

    FloatingBones

    Joined:
    Jul 19, 2006
    #8
    I tried to reproduce the behavior in message #3 of this thread. I copied the URL from the posting in question. When I do a quote of message #3, the extraneous punctuation is still there.
     
  9. thread starter macrumors 65816

    FloatingBones

    Joined:
    Jul 19, 2006
    #9
    Thanks, Q. You have restored order to the universe.

    Next time, I'll consult the character charts.
     

Share This Page