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

17 lines
437 B
Ruby
Raw Normal View History

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