views:

175

answers:

1

Hi

Just recently I stumble upon a strange url encoding problem.

I'm trying to encode (using php urlencode) this test title:

Quiz: Are The'se Com!!ments Ab_+=&out the 2001 iPod or 2010 iPad?

and then submit it to twitter using following url (user clicks 'share this content' link on my website):

http://www.twitter.com/home/?status=http://tinyurl.com/2eag89r+Quiz%3A+Are+The%27se+Com%21%21ments+Ab_%2B%3D%26out+the+2001+iPod+or+2010+iPad%3F

But if you will follow that url - you will see that url was double encoded (maybe by browser?) for some reason and some characters (like '!?+_) stay encoded.

How can I solve that encoding problem?

A: 

It seems as though your "Share This" code may encode the title on it's own and with you doing it again it gets double encoded.

Have you tried this without your urlencode?

Brad F Jacobs
gansbrest
+ as you can see in my initial post - that string is encoded just once. But when you click it % character gets encoded one more time, so initial encoded characters are preserved..
gansbrest