From: Zev Blut Date: 2005-05-19T21:30:34+09:00 Subject: Re: [ ruby-Bugs-1930 ] CGI::escapeHTML escapes the ampersand in an existing escape command I might have spoken too soon. The patch does break some round trip cases. ---------------------------------------------------------------------- p = "Ã" # A character escaped "���" CGI.unescapeHTML( patch_escape(p) ) #=> "\303" CGI.unescapeHTML( CGI.escapeHTML( p ) ) #=> "Ã" # The above two examples show that they differ on the round trip. x = CGI.unescapeHTML( patch_escape(p) ) #=> "\303" CGI.unescapeHTML( CGI.escapeHTML( x ) ) #=> "\303" CGI.unescapeHTML( patch_escape( x ) ) #=> "\303" # With the actual character "���" the round trip is the same. ---------------------------------------------------------------------- Oh well. Zev