ruby-changes:13458
From: xibbar <ko1@a...>
Date: Sun, 4 Oct 2009 23:00:56 +0900 (JST)
Subject: [ruby-changes:13458] Ruby:r25232 (ruby_1_8): * lib/cgi.rb (CGI.unescapeHTML): fix for hex values 80-FF,
xibbar 2009-10-04 23:00:41 +0900 (Sun, 04 Oct 2009) New Revision: 25232 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25232 Log: * lib/cgi.rb (CGI.unescapeHTML): fix for hex values 80-FF, single-byte hex entity encodings from 80-FF are valid HTML. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/cgi.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 25231) +++ ruby_1_8/ChangeLog (revision 25232) @@ -1,3 +1,8 @@ +Sun Oct 4 22:44:03 2009 Takeyuki FUJIOKA <xibbar@r...> + + * lib/cgi.rb (CGI.unescapeHTML): fix for hex values 80-FF, + single-byte hex entity encodings from 80-FF are valid HTML. + Sun Oct 4 19:30:54 2009 Nobuyoshi Nakada <nobu@r...> * marshal.c (struct {dump,load}_arg): manage with dfree, instead Index: ruby_1_8/lib/cgi.rb =================================================================== --- ruby_1_8/lib/cgi.rb (revision 25231) +++ ruby_1_8/lib/cgi.rb (revision 25232) @@ -385,7 +385,7 @@ end end when /\A#x([0-9a-f]+)\z/ni then - if $1.hex < 256 + if $1.hex < 128 $1.hex.chr else if $1.hex < 65536 and $KCODE[0] == ?U -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/