PDA

View Full Version : Link in message is broken but URL looks OK


FloatingBones
Jan 31, 2012, 09:56 PM
In this message (http://forums.macrumors.com/showpost.php?p=14248460&postcount=26), 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?

GGJstudios
Jan 31, 2012, 09:57 PM
In this message (http://forums.macrumors.com/showpost.php?p=14248460&postcount=26), 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?
Try this: http://www.bloomberg.com/news/2012-01-26/apple-google-poaching-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.

FloatingBones
Jan 31, 2012, 10:01 PM
Try this: http://www.bloomberg.com/news/2012-01-26/apple-google-poaching-case-will-go-forward-u-s-judge-says.html

I was already able to find the article.

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

When you quoted the post, the trailing space was dropped.

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 (http://www.bloomberg.com/news/2012-01-26/apple-google-poaching-case-will-go-forward-u-s-judge-says.html%22).

Doctor Q
Jan 31, 2012, 10:41 PM
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.

FloatingBones
Jan 31, 2012, 10:48 PM
When I quote the post with the bad URL, I get exactly the same bad URL.

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:

http://dl.dropbox.com/u/8493411/URL_corrected.jpg

Note: the URL has been changed: no trailing space.

Darth.Titan
Jan 31, 2012, 11:02 PM
%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.

Doctor Q
Jan 31, 2012, 11:24 PM
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 (http://www.ietf.org/rfc/rfc1738.txt), 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 hello 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
MacRumors (http://www.macrumors.com) <--- no quote marks
or
MacRumors (http://www.macrumors.com) <--- matching quote marks
but if you include only one of the two double quote marks your post will be broken.

FloatingBones
Jan 31, 2012, 11:25 PM
%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.

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.

FloatingBones
Feb 1, 2012, 10:18 PM
The %22 is not trimmed off. It's just shown in its more natural form: a double quote mark.

Thanks, Q. You have restored order to the universe.

Next time, I'll consult the character charts.