- def unescape_title(htmldata)
- # first pass -- let CGI try to attack it...
- htmldata = CGI::unescapeHTML htmldata
-
- # second pass -- destroy the remaining bits...
- htmldata.gsub(/(&(.+?);)/) {
- symbol = $2
-
- # remove the 0-paddng from unicode integers
- if symbol =~ /#(.+)/
- symbol = "##{$1.to_i.to_s}"
- end
-
- # output the symbol's irc-translated character, or a * if it's unknown
- UNESCAPE_TABLE[symbol] || '*'
- }
- end
-