Skip to content

Commit

Permalink
dont force encoding on escape/unescape
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Nov 26, 2011
1 parent 86edd1c commit 590a679
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/em-http/http_encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def unescape(s)
if defined?(EscapeUtils)
EscapeUtils.unescape_url(s.to_s)
else
s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) {
s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/) {
[$1.delete('%')].pack('H*')
}
end
Expand Down
2 changes: 1 addition & 1 deletion spec/encoding_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

it "should not issue warnings on non-ASCII encodings" do
# I don't know how to check for ruby warnings.
params = escape('valö')
params = escape('valö')
params = escape('valö'.encode('ISO-8859-15'))
end

Expand Down

0 comments on commit 590a679

Please sign in to comment.