mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-07-25 17:08:32 +00:00
19 lines
525 B
Ruby
19 lines
525 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Banzai
|
|
module Pipeline
|
|
class DescriptionPipeline < FullPipeline
|
|
ALLOWLIST = Banzai::Filter::SanitizationFilter::LIMITED.deep_dup.merge(
|
|
elements: Banzai::Filter::SanitizationFilter::LIMITED[:elements] - %w[pre code img ol ul li]
|
|
)
|
|
|
|
def self.transform_context(context)
|
|
super(context).merge(
|
|
allowlist: ALLOWLIST, # SanitizationFilter
|
|
no_header_anchors: true # header elements not allowed
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|