You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/08/14 11:09:40 UTC
DO NOT REPLY [Bug 11685] New: -
Unsafe URLEncoding in RequestUtil
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11685>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11685
Unsafe URLEncoding in RequestUtil
Summary: Unsafe URLEncoding in RequestUtil
Product: Struts
Version: Nightly Build
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Utilities
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: joachim.gjesdal@ecomda.de
RequestUtil uses java.net.URLEncode.encode(String key) which is for good reasons
depricated jdk1.4. I find myself writing scriptlets as a workaround to "help"
the html:link tag with this problem. My suggestion is to use something like this
in RequestUtil while we are waiting for jdk1.4.
private String utf8andURLEncode(String key){
byte b[] = key.getBytes("utf-8");
String encodedKey = new String (b);
return URLEncoder.encode(encodedKey);
}
or with jdk1.4
java.net.URLEncoder.encode(key,"utf-8");
thanks,
Joachim Gjesdal
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>