Class: Banzai::Filter::SanitizationFilter

Inherits:
HTML::Pipeline::SanitizationFilter
  • Object
show all
Defined in:
lib/banzai/filter/sanitization_filter.rb

Overview

Sanitize HTML

Extends HTML::Pipeline::SanitizationFilter with a custom whitelist.

Constant Summary collapse

UNSAFE_PROTOCOLS =
%w(data javascript vbscript).freeze

Instance Method Summary collapse

Instance Method Details

#whitelistObject


9
10
11
12
13
14
15
# File 'lib/banzai/filter/sanitization_filter.rb', line 9

def whitelist
  whitelist = super

  customize_whitelist(whitelist)

  whitelist
end