Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

linter: Add _html as a variable name for safe html.

evykassirerbabe525b5cfd
diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py
index 7ce19f62091..3f0e28f11b6 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|\$\("<p>"\))""",
+ "exclude_pattern": r"""\.html\(("|'|render_|\w+_html|html|message\.content|util\.clean_user_content_links|rendered_|$|\)|error_html|widget_elem|\$error|\$\("<p>"\))""",
"exclude": {
"web/src/portico",
"web/src/lightbox.js",