Sha256: 0751e0c81b4090e200f66598313d0341cc1f9a964dada9ce8c101deee3e3dace
Contents?: true
Size: 794 Bytes
Versions: 10
Compression:
Stored size: 794 Bytes
Contents
--FILE-- <?php $env = new MtHaml\Environment('php', array( 'enable_escaper' => true, 'escape_attrs' => 'once', )); echo $env->compileString($parts['HAML'], "$file.haml"); --HAML-- %html %body{:some=> "attr& #{$foo}"} %p{"#{$foo}" => "foo"}(z=$x) = "escaped" &= "escaped" != "not escaped" --EXPECT-- <html> <body <?php echo MtHaml\Runtime::renderAttributes(array(array('some', ('attr& ' . $foo))), 'html5', 'UTF-8'); ?>> <p <?php echo MtHaml\Runtime::renderAttributes(array(array($foo, 'foo'), array('z', $x)), 'html5', 'UTF-8'); ?>> <?php echo htmlspecialchars("escaped",ENT_QUOTES,'UTF-8'); ?> <?php echo htmlspecialchars("escaped",ENT_QUOTES,'UTF-8'); ?> <?php echo "not escaped"; ?> </p> </body> </html>
Version data entries
10 entries across 10 versions & 1 rubygems