File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
test/query-tests/DOM/TargetBlank Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ predicate hasDynamicHrefHostAttributeValue(DOM::ElementDefinition elem) {
43
43
url .regexpMatch ( Templating:: getDelimiterMatchingRegexpWithPrefix ( "[^?#]*" ) ) and
44
44
// ... that does not start with a fixed host or a relative path (common formats)
45
45
not url .regexpMatch ( "(?i)((https?:)?//)?[-a-z0-9.]*/.*" ) and
46
- // .. that is not a call to `url_for` in a Flask application
47
- not url .regexpMatch ( "\\{\\{\\s*url_for .*" )
46
+ // .. that is not a call to `url_for` in a Flask / nunjucks application
47
+ not url .regexpMatch ( "\\{\\{\\s*url(_for)?\\(.+\\) .*" )
48
48
)
49
49
)
50
50
}
Original file line number Diff line number Diff line change @@ -62,4 +62,7 @@ function f() {
62
62
// OK, Flask application with internal links
63
63
< a href = "{{url_for('foo.html', 'foo')}}" target = "_blank" > Example</ a > ;
64
64
< a href = "{{ url_for('foo.html', 'foo')}}" target = "_blank" > Example</ a > ;
65
- < a href = "{{ url_for('foo.html', 'foo')}}" target = "_blank" > Example</ a > ;
65
+ < a href = "{{ url_for('foo.html', 'foo')}}" target = "_blank" > Example</ a > ;
66
+
67
+ // OK, nunjucks template
68
+ < a href = "{{ url('foo', query={bla}) }}" target = "_blank" > Example</ a >
You can’t perform that action at this time.
0 commit comments