def decode(html)
      html.gsub(ENTITIES::REGEXP){
        if $1 
          if ENTITIES::MAP[$1]
            ENTITIES::MAP[$1]
          else
            $&
          end
        elsif $2
          [$2.to_i(10)].pack('U')
        elsif $3
          [$3.to_i(16)].pack('U')
        else
          $&
        end
      }
    end
def decode(html)
      html.gsub(ENTITIES::REGEXP){
        if $1 
          if ENTITIES::MAP[$1]
            ENTITIES::MAP[$1]
          else
            $&
          end
        elsif $2
          [$2.to_i(10)].pack('U')
        elsif $3
          [$3.to_i(16)].pack('U')
        else
          $&
        end
      }
    end
decode html entity