Sha256: 2a3b2bbd607ecc09d2dfc40d44853aa86a57f9410279cafe2519709f1700f087

Contents?: true

Size: 438 Bytes

Versions: 6

Compression:

Stored size: 438 Bytes

Contents

require "amakanize/filters/base_filter"
require "cgi"

module Amakanize
  module Filters
    class HtmlUnescapeFilter < ::Amakanize::Filters::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

6 entries across 6 versions & 1 rubygems

Version Path
amakanize-0.7.0 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.6.5 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.6.4 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.6.3 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.6.2 lib/amakanize/filters/html_unescape_filter.rb
amakanize-0.6.1 lib/amakanize/filters/html_unescape_filter.rb