A rookie question:
I have a simple submission form, the problem is if there is any space given for the inputs the value gets changed to a plus(+).
This is my form:
<form name="input" action="search" method="get">
Web Address: <input type="text" name="address"><br>
Search Query: <input type="text" name="query"><br>
<input type="submit" value="Search">
</form>
I'd like to give an example:
if user fills "address here" to the first box and "query here" to the second box. The address that I get after the click is "search?address=address+here&query=query+here"
instead of "search?address=address%20here&query=query%20here"
. How can I change these "namespaces" with %20
instead of + signs?
The reason why I don't want plus sign instead of %20
is because I am writing a search engine in Java language and using sun's httpserver library for the web server. This library handles the "query" part of the result(which is after? sign) by using .getRequestURI().getQuery()
method, however this method handles %20 as space and sees plus sign as plus. If this is not "fixable" then I can also accept a solution that involves javascript.