gitlab-org--gitlab-foss/lib/banzai/pipeline/description_pipeline.rb

19 lines
468 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Banzai
module Pipeline
2015-10-21 06:18:23 -04:00
class DescriptionPipeline < FullPipeline
WHITELIST = Banzai::Filter::SanitizationFilter::LIMITED.deep_dup.merge(
elements: Banzai::Filter::SanitizationFilter::LIMITED[:elements] - %w(pre code img ol ul li)
)
2015-10-21 06:18:23 -04:00
def self.transform_context(context)
super(context).merge(
2015-10-21 06:18:23 -04:00
# SanitizationFilter
whitelist: WHITELIST
2015-10-21 06:18:23 -04:00
)
end
end
end
end