Skip to content

There is no way to use spaces in the content filtering modules replacement texts #21

Description

@Risenbergen

There is no way to use spaces in the content filtering modules replacement texts defined in the configuration file, below is a working and non-working configuration snippet.

  • The following works:
# Example:
# To block pages with score "PornScore" greater than 15  and replace some
# bad words and add an info header to pages with score greater than 5
# use:
srv_content_filtering.Match PornScore body /(\ +)(fuck|pussy)(\ +)/i score=10 info{XXX}="(1)XXX(3)"
srv_content_filtering.Profile chtsanti block score{PornScore>15}
srv_content_filtering.Profile chtsanti replace score{PornScore>5} replaceInfo=XXX
srv_content_filtering.Profile chtsanti add_header score{PornScore>5} "X-SrvContentFiltering-Module: maybe-porn"
  • But this does not:
# Example:
# To block pages with score "PornScore" greater than 15  and replace some
# bad words and add an info header to pages with score greater than 5
# use:
srv_content_filtering.Match PornScore body /(\ +)(fuck|pussy)(\ +)/i score=10 info{XXX}="(1)X X X(3)"
srv_content_filtering.Profile chtsanti block score{PornScore>15}
srv_content_filtering.Profile chtsanti replace score{PornScore>5} replaceInfo=XXX
srv_content_filtering.Profile chtsanti add_header score{PornScore>5} "X-SrvContentFiltering-Module: maybe-porn"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions