From babe525b5cfd3a3efcc96d3b5dde178578b40892 Mon Sep 17 00:00:00 2001 From: evykassirer Date: Tue, 5 Mar 2024 12:57:28 -0800 Subject: [PATCH] linter: Add _html as a variable name for safe html. --- tools/linter_lib/custom_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 7ce19f6209..3f0e28f11b 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -141,7 +141,7 @@ js_rules = RuleList( {"pattern": r"\+.*\$t\(.+\)", "description": "Do not concatenate i18n strings"}, { "pattern": "[.]html[(]", - "exclude_pattern": r"""\.html\(("|'|render_|html|message\.content|util\.clean_user_content_links|rendered_|$|\)|error_html|widget_elem|\$error|\$\("

"\))""", + "exclude_pattern": r"""\.html\(("|'|render_|\w+_html|html|message\.content|util\.clean_user_content_links|rendered_|$|\)|error_html|widget_elem|\$error|\$\("

"\))""", "exclude": { "web/src/portico", "web/src/lightbox.js",