From: Axel Etzold Date: 2008-09-08T03:31:38+09:00 Subject: Re: CGI unescapeHTML to escape code '&# 8211;' -------- Original-Nachricht -------- > Datum: Mon, 8 Sep 2008 01:45:44 +0900 > Von: Shashank Agarwal > An: ruby-talk@ruby-lang.org > Betreff: CGI unescapeHTML to escape code \'&# 8211;\' > I'm reading an XML file that has the html codes for hyphens and stuff > like that. I tried escaping hyphen's html code, which is '&# 8211;' > (space added to avoid interpretation) with the CGI::unescapeHTML > function. But it did not escape it. Is there a way to escape such codes? > -- > Posted via http://www.ruby-forum.com/. Dear Shashank, have a look at htmlentites (http://htmlentities.rubyforge.org/). Maybe you can re-escape its results using CGI.escape, if that's needed. Best regards, Axel -- GMX Kostenlose Spiele: Einfach online spielen und Spa� haben mit Pastry Passion! http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196