2018-10-06 23:10:08 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-12-15 14:51:16 +00:00
|
|
|
module Banzai
|
|
|
|
module Pipeline
|
2015-10-21 10:18:23 +00:00
|
|
|
class DescriptionPipeline < FullPipeline
|
2016-06-13 12:06:40 +00:00
|
|
|
WHITELIST = Banzai::Filter::SanitizationFilter::LIMITED.deep_dup.merge(
|
|
|
|
elements: Banzai::Filter::SanitizationFilter::LIMITED[:elements] - %w(pre code img ol ul li)
|
|
|
|
)
|
|
|
|
|
2015-10-21 10:18:23 +00:00
|
|
|
def self.transform_context(context)
|
2015-12-15 14:51:16 +00:00
|
|
|
super(context).merge(
|
2015-10-21 10:18:23 +00:00
|
|
|
# SanitizationFilter
|
2016-06-13 12:06:40 +00:00
|
|
|
whitelist: WHITELIST
|
2015-10-21 10:18:23 +00:00
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|