views:

98

answers:

2

I have a form using the GET method. If values are submitted with special characters, they appear in the URI as: ?value=fudge%20and%20stuff

How do I make it clean? I don't want to use the header function because this is happening within a page in drupal.

+4  A: 

A URL cannot contain spaces and many other "special characters", therefore they get encoded. Unfortunately there isn't a lot you can do about it. The most you could do is some JavaScript trickery in the form, but I don't think it's worth it.

Matti Virkkunen
+1  A: 

If %20 bothers you, you can substitute (GREP replace) the + character (?value=fudge+and+stuff) for better readability. Otherwise there's not a lot you can do. Other "exotic" characters will be similarly escaped, and need to be.

Robusto