# File lib/htmlentities.rb, line 203
    def decode_entities
        return gsub(HTMLEntities::NAMED_ENTITY_REGEXP) { 
            HTMLEntities::MAP.has_key?($1) ? [HTMLEntities::MAP[$1]].pack('U') : $& 
        }.gsub(/&#([0-9]{1,7});/) { 
            [$1.to_i].pack('U') 
        }.gsub(/&#x([0-9a-f]{1,6});/i) { 
            [$1.to_i(16)].pack('U') 
        }
    end