2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
module Banzai
|
|
|
|
module Pipeline
|
|
|
|
class DescriptionPipeline < FullPipeline
|
2021-03-08 18:12:59 +05:30
|
|
|
ALLOWLIST = Banzai::Filter::SanitizationFilter::LIMITED.deep_dup.merge(
|
2016-06-16 23:09:34 +05:30
|
|
|
elements: Banzai::Filter::SanitizationFilter::LIMITED[:elements] - %w(pre code img ol ul li)
|
|
|
|
)
|
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
def self.transform_context(context)
|
|
|
|
super(context).merge(
|
|
|
|
# SanitizationFilter
|
2021-03-08 18:12:59 +05:30
|
|
|
allowlist: ALLOWLIST
|
2015-12-23 02:04:40 +05:30
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|