google / guava

Google core libraries for Java
Apache License 2.0
50.13k stars 10.89k forks source link

Add examples to UrlEscapers javadoc #1756

Open gissuebot opened 9 years ago

gissuebot commented 9 years ago

Original issue created by mikhail.mazursky on 2014-05-16 at 08:15 AM


Please consider adding usage examples to UrlEscapers javadocs - what method should be used to escape what part of URIs, when consructing them (and also there is application/x-www-form-urlencoded specially for forms). E.g.

It looks like a lot of developers are not aware of the subtleties of escaping and such explicit examples can help avoid lots of bugs. For instance, I was not aware about differences of escaping of query params and HTML form parameters. The following article just opened my eyes http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding

gissuebot commented 9 years ago

Original comment posted by kak@google.com on 2014-06-03 at 04:00 PM


(No comment entered for this change.)


Owner: cpovirk@google.com

cpovirk commented 9 years ago

For my reference, we added an incomplete table to the internal Google codebase in CL 100848159. It ended up containing the same entries as this bug report.