Sha256: 94b90a695395c46ffd08bcb718ba44b754da0d0e5bc0d858fd47f3e018ba2dbb

Contents?: true

Size: 238 Bytes

Versions: 5

Compression:

Stored size: 238 Bytes

Contents

module Convert
  module Converters

    def unescape_html(string, options = {})
      @regex = /(<.*?[a-z]{0,12}?>)+/i

      string.gsub(@regex) do |tag|
        tag.gsub("&lt;", "<").gsub("&gt;", ">")
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convert-0.1.7 lib/converters/unescape_html.rb
convert-0.1.6 lib/converters/unescape_html.rb
convert-0.1.5 lib/converters/unescape_html.rb
convert-0.1.4 lib/converters/unescape_html.rb
convert-0.1.3 lib/converters/unescape_html.rb