I want to remove any of special characters in a url. I tried the StringEscapeUtils class to remove special chars. But no use of that. For eg: http%3A%2Ffeeds.feedburner.com%2FNdtvNews-TopStories . Any of ideas are welcome
URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20.
A space is assigned number 32, which is 20 in hexadecimal. When you see “%20,” it represents a space in an encoded URL, for example, http://www.example.com/products%20and%20services.html.
Some characters cannot be part of a URL (for example, the space) and some other characters have a special meaning in a URL. In HTML forms, the character = is used to separate a name from a value.
I have used java.net.URLDecoder.decode("String") in the past. Should still hold.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With