We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2265766 commit 654f6d1Copy full SHA for 654f6d1
tests/Phug/Compiler/AttributeCompilerTest.php
@@ -61,6 +61,26 @@ public function testCompile()
61
);
62
}
63
64
+ /**
65
+ * @covers ::<public>
66
+ */
67
+ public function testUnescapedAttributes()
68
+ {
69
+ $this->assertRenderFile(
70
+ [
71
+ '<script type="text/x-template">'.PHP_EOL,
72
+ ' <div id="user-<%= user.id %>">'.PHP_EOL,
73
+ ' <h1><%= user.title %></h1>'.PHP_EOL,
74
+ ' </div>'.PHP_EOL,
75
+ '</script>'.PHP_EOL,
76
+ ],
77
+ __DIR__.'/../../templates/attrs.unescaped.pug',
78
79
+ 'pretty' => ' ',
80
+ ]
81
+ );
82
+ }
83
+
84
/**
85
* @covers ::<public>
86
* @expectedException \Phug\CompilerException
tests/templates/attrs.unescaped.pug
@@ -0,0 +1,3 @@
1
+script(type='text/x-template')
2
+ div(id!='user-<%= user.id %>')
3
+ h1 <%= user.title %>
0 commit comments