vendor/bundle/ruby/2.6.0/gems/html-pipeline-2.14.1/lib/html/pipeline/sanitization_filter.rb
def allowlist
        allowlist = context[:allowlist] || context[:whitelist] || ALLOWLIST
        anchor_schemes = context[:anchor_schemes]
        return allowlist unless anchor_schemes
        allowlist = allowlist.dup
        allowlist[:protocols] = (allowlist[:protocols] || {}).dup
        allowlist[:protocols]['a'] = (allowlist[:protocols]['a'] || {}).merge('href' => anchor_schemes)
        allowlist
      end
# The allowlist to use when sanitizing. This can be passed in the context
# hash to the filter but defaults to ALLOWLIST constant value above.
The allowlist to use when sanitizing. This can be passed in the context
hash to the filter but defaults to ALLOWLIST constant value above.
The allowlist to use when sanitizing . This can be passed in the context hash to the filter but defaults to ALLOWLIST constant value above .
def allowlist
        allowlist = context[:allowlist] || context[:whitelist] || ALLOWLIST
        anchor_schemes = context[:anchor_schemes]
        return allowlist unless anchor_schemes
        allowlist = allowlist.dup
        allowlist[:protocols] = (allowlist[:protocols] || {}).dup
        allowlist[:protocols]['a'] = (allowlist[:protocols]['a'] || {}).merge('href' => anchor_schemes)
        allowlist
      end
def allowlist allowlist = context [ :allowlist ] || context [ :whitelist ] || ALLOWLIST anchor_schemes = context [ :anchor_schemes ] return allowlist unless anchor_schemes allowlist = allowlist . dup allowlist [ :protocols ] = ( allowlist [ :protocols ] || { } ) . dup allowlist [ :protocols ] [ 'a' ] = ( allowlist [ :protocols ] [ 'a' ] || { } ) . merge ( 'href' => anchor_schemes ) allowlist end
The allowlist to use when sanitizing.
The allowlist to use when sanitizing .