Sha256: a8602207ac0c5204e161740b62e1de6061c5b29d6328d8b0ecdddef2b3383fc7

Contents?: true

Size: 376 Bytes

Versions: 5

Compression:

Stored size: 376 Bytes

Contents

require "cgi"

module Amakanize
  module Filters
    class HtmlUnescapeFilter < BaseFilter
      # @note Override
      # @param output [String] e.g. `"&lt;ハノカゲ&gt;"`
      # @return [Hash] e.g. `"ハノカゲ"`
      def call(context:, output:)
        {
          context: context,
          output: ::CGI.unescapeHTML(output),
        }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
amakanize-0.6.0 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.5.3 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.5.2 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.5.1 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.5.0 lib/amakanize/filters/html_unescape_filter.rb