diff --git a/src/djlint/rules.yaml b/src/djlint/rules.yaml index dc794259..e32ed564 100644 --- a/src/djlint/rules.yaml +++ b/src/djlint/rules.yaml @@ -126,14 +126,14 @@ flags: re.DOTALL|re.I patterns: - <(?:a|div|span|input)\b[^>]*?\s(?:href|data-url|data-src|action)=[\"|'](?!(?:https?://)|javascript:|on\w+:|mailto:|tel:|data:)[\w|/]+ - -
'), + ([]), + id="DJ018_action_attr_url", + ), pytest.param( ("{% blah 'asdf %}"), ( diff --git a/tests/test_linter/test_jinja_linter.py b/tests/test_linter/test_jinja_linter.py index f57f2c22..3523ffa6 100644 --- a/tests/test_linter/test_jinja_linter.py +++ b/tests/test_linter/test_jinja_linter.py @@ -134,6 +134,11 @@ ([]), id="J018_attributes", ), + pytest.param( + (''), + ([]), + id="J018_action_attr_url", + ), pytest.param( ( "{% macro rendersubmit(buttons=[], class=\"\", index='', url='', that=\"\" , test='') -%}"