[Xss-http-filter-commits] SF.net SVN: xss-http-filter:[13] trunk/src/main/java/net/sf/xsshttpfilter
Brought to you by:
micksembwever
|
From: <mic...@us...> - 2010-09-07 18:05:47
|
Revision: 13
http://xss-http-filter.svn.sourceforge.net/xss-http-filter/?rev=13&view=rev
Author: micksembwever
Date: 2010-09-07 18:05:41 +0000 (Tue, 07 Sep 2010)
Log Message:
-----------
bugfix: unicode entities and url-encoded characters were not being decoded as hex digits (radix 16)
Modified Paths:
--------------
trunk/src/main/java/net/sf/xsshttpfilter/HTMLFilter.java
Modified: trunk/src/main/java/net/sf/xsshttpfilter/HTMLFilter.java
===================================================================
--- trunk/src/main/java/net/sf/xsshttpfilter/HTMLFilter.java 2010-09-06 09:25:38 UTC (rev 12)
+++ trunk/src/main/java/net/sf/xsshttpfilter/HTMLFilter.java 2010-09-07 18:05:41 UTC (rev 13)
@@ -430,7 +430,7 @@
m = P_ENTITY_UNICODE.matcher(s);
while (m.find()) {
final String match = m.group(1);
- final int decimal = Integer.decode(match).intValue();
+ final int decimal = Integer.valueOf(match, 16).intValue();
m.appendReplacement(buf, chr(decimal));
}
m.appendTail(buf);
@@ -440,7 +440,7 @@
m = P_ENCODE.matcher(s);
while (m.find()) {
final String match = m.group(1);
- final int decimal = Integer.decode(match).intValue();
+ final int decimal = Integer.valueOf(match, 16).intValue();
m.appendReplacement(buf, chr(decimal));
}
m.appendTail(buf);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|