hi there!
how do remove the percent sign in my url address?
Scenario:
I have a searchbox when the user enter for example 'sample 15%' the button will pass a parameter 'keyword'
to the address bar making the url like this www.sampleWebsite.com/searchword.php&keyword=sample%2015% and it will redirect me into a error page Bad request Erroe 400
what should I do? thanks!
-
☆ A M B ☆
- 24,524 Posts
You need to use URL encoding (%xx) for characters like that.
%20 is for space, %25 is for the % sign.
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
There is a plugin for this, but I can't find it at the moment.
thanks for the reply
what is the name of the plugin?
-
☆ A M B ☆
- 24,524 Posts
Personally, I would just re-code the link generating snippet to produce a safe string to use in the URL.
hmm the search is trigger by a button which runs in js the the js will get the value of the input search box where the keyword is the the js will pass it to the url..
how do I change this I think re-code will fall in my input search box