Skip to content

Commit

Permalink
- added decode of UTF-16 escapes in url-arguments (%u0123), bugfix for
Browse files Browse the repository at this point in the history
  • Loading branch information
karlchenofhell committed Dec 16, 2006
1 parent 782db90 commit 6118fb7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/de/anomic/http/httpd.java
Expand Up @@ -767,8 +767,15 @@ private static String parseArg(String s) {
baos.write(' ');
pos++;
} else if (s.charAt(pos) == '%') {
baos.write(Integer.parseInt(s.substring(pos + 1, pos + 3), 16));
pos += 3;
// start change by [FB]: added UTF-escapes
if (s.charAt(pos + 1) == 'u') { // UTF-16 escape
pos += 6;
baos.write(Integer.parseInt(s.substring(pos + 2, pos + 6), 16));
} else { // normal escape
pos += 3;
baos.write(Integer.parseInt(s.substring(pos + 1, pos + 3), 16));
}
// end change by [FB]
} else {
baos.write(s.charAt(pos++));
}
Expand Down

0 comments on commit 6118fb7

Please sign in to comment.