summaryrefslogtreecommitdiff
path: root/lib/banzai/pipeline/description_pipeline.rb
blob: d5ff9b025cc9d3db5aa8a2d20c96c98645631b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Banzai
  module Pipeline
    class DescriptionPipeline < FullPipeline
      WHITELIST = Banzai::Filter::SanitizationFilter::LIMITED.deep_dup.merge(
        elements: Banzai::Filter::SanitizationFilter::LIMITED[:elements] - %w(pre code img ol ul li)
      )

      def self.transform_context(context)
        super(context).merge(
          # SanitizationFilter
          whitelist: WHITELIST
        )
      end
    end
  end
end