From 1f3125a35fb772f67b151ae7e7e969a53e4c9086 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 21 Sep 2007 09:20:11 +0000 Subject: Utils.decode_html_entities: fix decoding of unknown symbols --- lib/rbot/core/utils/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rbot') 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 -- cgit v1.2.3