We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72b08f5 commit 03758f3Copy full SHA for 03758f3
1 file changed
src/test/java/com/hubspot/jinjava/lib/tag/ForTagTest.java
@@ -406,6 +406,15 @@ public void forLoopTupleWithNullValues() {
406
assertThat(result).isEqualTo(" -1 -1 null null null ");
407
}
408
409
+ @Test
410
+ public void itUsesJinjavaRestrictedResolverOnReadingLoopVars() {
411
+ String template =
412
+ """
413
+ {% for _, config, class in ____int3rpr3t3r____ %}{{ class }}{% endfor %}""";
414
+ String result = interpreter.render(template);
415
+ assertThat(result).isEqualTo("");
416
+ }
417
+
418
public static boolean inForLoop() {
419
JinjavaInterpreter interpreter = JinjavaInterpreter.getCurrent();
420
return interpreter.getContext().isInForLoop();
0 commit comments