owasp-java-encoder
owasp-java-encoder copied to clipboard
Alternative method for deprecated forUri() method
trafficstars
Hi,
I want to replace Encode::forUri with something that is not depricated. Does anyone know what method should I use to cover that up? I can't use forUriComponent() because I have to convert an link, not a query, and also forUriComponent() doesn't convert all the characters as forUri() did
Code example: private static final ImmutableList<UnaryOperator<String>> ENCODING_CHAIN_URL_IN_HTML_ATTRIBUTE = ImmutableList.of(Encode::forUri, EsEncode::uriAsSafeSchemeUri, Encode::forHtml);
Thanks!
forURL ? No one really uses URI anymore that was just Jeff :)