Any Post That Contains a Link With a Percent Symbol in the URL Causes an Error

This topic is locked from further discussion.

Avatar image for Sentinelrv
Sentinelrv

23386

Forum Posts

0

Wiki Points

0

Followers

Reviews: 2

User Lists: 0

#1 Sentinelrv
Member since 2002 • 23386 Posts

I recently came back to GameSpot to reactivate The HeadCrab Union. I was trying to post all the news we've missed to the front page when I ran into something I never previously had to deal with. I kept getting this error message when trying to post links to pictures with my Photobucket account. I did some testing and narrowed the problem down to this. No link will post if it has a % in the URL.

Any photo album on Photobucket that has a space in the title automatically puts %20 in the URL. For example, if my album title was "HeadCrab Union," the URL would contain "headcrab%20union" in it. Because of this, I can't link any image that has a space in the album title. I could edit all my album titles to remove any spaces, but that would also break all the image links on all of the HCU's news articles since the union system was first created. I'm not going to go fix thousands of articles, so that's not an option for me. I could also create a new Photobucket account with new album titles and transfer all the images over to the new one, but again that's thousands of images and a lot of work.

Is there a reason for this? Was this done intentionally? It's not just pictures either. Any link at all that contains a percent in it will give me the same error and won't allow me to post the message. What can I do to resolve this situation?

Avatar image for gmax
gmax

6865

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#2 gmax  Moderator
Member since 2005 • 6865 Posts
I don't usually comment on union issues, but in this case it might help to clarify exactly where and how you are trying to post, and maybe even exactly what you are trying to post. I just did some experiments with spaces and %20s in made up test posts, and I couldn't get preview to trigger any errors. I thought it was going to be easier to reproduce what you were describing.

Avatar image for Sentinelrv
Sentinelrv

23386

Forum Posts

0

Wiki Points

0

Followers

Reviews: 2

User Lists: 0

#3 Sentinelrv
Member since 2002 • 23386 Posts

You're right. I think there's something else going on that I must have overlooked. Also, this isn't a union issue. I've checked on the main forums and PM box and wherever there is a WYSIWYG editor, this error happens. By the way, you don't have to put %20 in the link. All that's needed is one % symbol, but as you pointed out, sometimes it happens and sometimes it doesn't. This is the original image I way trying to link in my posts. Notice all the percents. These are spaces in the album titles. Try and link it to something and you'll find it doesn't work...

http://i23.photobucket.com/albums/b382/HCU/VALVe%20Games/Half-Life%202%20Episode%20Three/advisor.jpg

You should get the following error message...

Errors:
- Your path is not valid [valve%20games].
- If you are copying from a word processing software, try pasting the text into a plain text editor (e.g., Notepad) first.
- If problems persist, try disabling the WYSIWYG editor in your preferences.

For the record, I am using GameSpot's WYSIWYG editor to do this. All I do is type something in the editor like "Testing," then I highlight it and hit the link button on the editor, paste the image link in the box and hit insert. Hitting preview after that gives me the error message.

Now besides that, I think I figured out something that gets the error to trigger. In all the following example links, notice the placement of the percent symbol in the link. I'll bold it for you. I used each link twice, the first link will work and the second link will not, even though every link contains a percent symbol.

Works - http://images.wikia.com/lostpedia/images/1/16/Lost-%season1.jpg

Causes Error - http://images.wikia.com/lost%pedia/images/1/16/Lost-season1.jpg

---

Works - http://www.youtube.com/wat%ch?v=FG2PUZoukfA

Causes Error - http://www.you%tube.com/watch?v=FG2PUZoukfA

---

Works - http://www.gamespot.com/forums/topic/28707757/any-post-that-contains-a-link-with-a-percent-symbol-in-the-url-causes-an-error-?tag=topics%3Btitle

Causes Error - http://www.gamespot.com/forums/top%ic/28707757/any-post-that-contains-a-link-with-a-percent-symbol-in-the-url-causes-an-error-?tag=topics%3Btitle

---

Works - http://digg.com/news/politics/mitt_romney_takes_gop_fire_%in_michigan_for_his_let_detroit_go_bankrupt

Causes Error - http://digg.com/news/poli%tics/mitt_romney_takes_gop_fire_in_michigan_for_his_let_detroit_go_bankrupt

Notice that every link here has a percent in it, but some work and some cause the error. In the image link that works, the percent is in the file name at the end. In the rest of the links that work, the percent is also located somewhere toward the end of the link, but all the links that cause the error have percents that are located somewhere in the middle of the link. I'm not sure of what significance this is, but I think I just pointed out a pattern here. Let me know if everything worked for you and what you think. I've been holding off to post more articles on my union until this is resolved.

EDIT: Maybe my assumption that placing percents at the end was incorrect also, because I just tried another variation of the links I already used above and came out with two links that cause the error while the percent is at the end of the link. I'm confused here, so maybe you guys can figure this out. Here are the two that don't work...

http://www.youtube.com/watch?v=FG2PUZ%oukfA

http://www.gamespot.com/forums/topic/28707757/any-post-that-contains-a-link-with-a-percent-symbol-in-the-url-causes-an-error-?tag=topics%3Bti%tle

Avatar image for hesel
hesel

2738

Forum Posts

0

Wiki Points

0

Followers

Reviews: 3

User Lists: 0

#4 hesel
Member since 2006 • 2738 Posts

Why not try using the HTML code
& #37;
without the spacing between & and #

Just remove the % sign and add the html number, I don't know if it will work but worth a stab.

Avatar image for The-Apostle
The-Apostle

12197

Forum Posts

0

Wiki Points

0

Followers

Reviews: 10

User Lists: 0

#5 The-Apostle
Member since 2004 • 12197 Posts

Yeah, I just tried it myself and it doesn't work.

Avatar image for gmax
gmax

6865

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#6 gmax  Moderator
Member since 2005 • 6865 Posts
Ok.. The tests I was trying were too simple. Figures. I'll discuss the following:
  • Link URLs in general
  • Some problems with the URL filter here at GS
  • How you can still post this item
In general, a URL looks like this:
scheme://domain:port/path?query#fragment
There are extensive rules that describe what each of those parts in red can look like. For example, the original rules for the domain part limit it to letters a-z, digits 0-9, and periods. A percent character in a domain is thus not allowed. The rules for what can appear in the path and query parts are actually pretty complicated, and some sites use URLs that take some liberties with those rules - but they do it because it will (usually) still work. In the context of URLs, and in particular the path and query parts, the percent character is an "active" character with a very particular role - it allows embedding characters in a URL that the rules would otherwise disallow. When a percent is used in this way, it is followed by two hexadecimal digits. That's supposed to be ok. Having a percent character at any random spot without it being followed by two hexadecimal digits would not be a good idea, and might be disallowed. Ok. So what is GameSpot up to? It should be ok to include a %xx construction in a path or query, but the content filter balks on it. I honestly don't know why they decided to do that, but I think it started a long time ago[1], and it still affects lots of things, the %xx constructions being among them. Basically, GS adopted a set of rules that was far more restrictive than necessary and that rejects a lot of working real world URLs. I still think that's a bug, but I don't see it getting changed any time soon. So, what to do? In this case, there are several possibilities. When you have control over the path elements of a URL, don't include characters that would require % escapes. Spaces, in particular, are a bad idea and just aren't worth the trouble. That's an opinion, but it's also exactly what got us here. Changing the path element names to remove the spaces would completely solve this particular problem. Another option is to just switch to bbcode instead of straight up html. For whatever reason, the super restrictive URL formatting rules only apply to html anchor (a) tags. You can actually create a link with %20 escapes and all with a url bbcode tag like this. (Quote this to get a look at it if you want.) Note that it's very likely that to do stuff like this successfully you'll have to disable the wysiwyg editor - it does not correctly understand bbcode or the relationship that html and bbcode must share. I routinely recommend disabling the wysiwyg editor all the time anyway. Seriously - it's broken - don't use it. Failing all of that there are a couple other options. You could use a different image host that always generated simpler URLs for the images they let you host there, or you might be able to employ a URL shortening service that can support whatever peculiar URLs you are faced with. I know that's a lot of discussion, but hopefully seeing the various sides of this will help you find an approach that works well for you.

Avatar image for Sentinelrv
Sentinelrv

23386

Forum Posts

0

Wiki Points

0

Followers

Reviews: 2

User Lists: 0

#7 Sentinelrv
Member since 2002 • 23386 Posts

Thanks for your help.