diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-21 09:20:11 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-21 09:20:11 +0000 |
commit | 1f3125a35fb772f67b151ae7e7e969a53e4c9086 (patch) | |
tree | dcb72958d7d4b30c1f38c09fd3e81cded72735d5 | |
parent | 9b4a429d7f672a97199d1d45efbdbdf51ddd25ad (diff) |
Utils.decode_html_entities: fix decoding of unknown symbols
-rw-r--r-- | lib/rbot/core/utils/utils.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbot/core/utils/utils.rb b/lib/rbot/core/utils/utils.rb index 1b6a0ce9..4a3a9c0a 100644 --- a/lib/rbot/core/utils/utils.rb +++ b/lib/rbot/core/utils/utils.rb @@ -466,7 +466,7 @@ module ::Irc end # output the symbol's irc-translated character, or a * if it's unknown - UNESCAPE_TABLE[symbol] || [symbol[/\d+/].to_i].pack("U") rescue '*' + UNESCAPE_TABLE[symbol] || (symbol.match(/^\d+$/) ? [$0.to_i].pack("U") : '*') } end end |