2015-12-15 09:51:16 -05:00
|
|
|
module Banzai
|
|
|
|
module Pipeline
|
2015-10-21 06:18:23 -04:00
|
|
|
class DescriptionPipeline < FullPipeline
|
2016-06-13 08:06:40 -04: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 06:18:23 -04:00
|
|
|
def self.transform_context(context)
|
2015-12-15 09:51:16 -05:00
|
|
|
super(context).merge(
|
2015-10-21 06:18:23 -04:00
|
|
|
# SanitizationFilter
|
2016-06-13 08:06:40 -04:00
|
|
|
whitelist: WHITELIST
|
2015-10-21 06:18:23 -04:00
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|