From f6d3b541e075dfa2634daf29be5733845881c887 Mon Sep 17 00:00:00 2001 From: Viktor <67437+vfonic@users.noreply.github.com> Date: Tue, 22 Apr 2025 12:03:36 -0500 Subject: [PATCH] Docs: Fix `template_exclusion_filter` explanation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 005baac..910c6f1 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Available configuration options are: by `SafeErbTester` when determining whether or not a given attribute value will be eval'ed as javascript. Defaults to `[/\Aon/i]` (matches `onclick` for example). * `template_exclusion_filter`: This is called when determining whether to apply runtime checks on a `.erb` template. - When this `Proc` returns false, no safety checks are applied and parsing is done using the default Rails erubi engine. + When this `Proc` returns true, no safety checks are applied and parsing is done using the default Rails erubi engine. For example, to exclude erb templates provided by libraries, use: `Proc.new { |filename| !filename.start_with?(Rails.root.to_s) }`. Defaults to `nil` (all html.erb templates are parsed).