Latte: inconsistent behaviour with auto-quoting
Notice: This thread is very old.
- Cifro
- Member | 245
Hi everyone. A found inconsistent behavior with auto-quoting in Latte from Nette v2.0.x
Update: This is fixed in 2.1-dev, but it should be fixed in 2.0.x branch too, which supports PHP 5.2 yet.
In this first case colorbox
will be quoted.
Input:
{if $el->option->display == colorbox}
{/if}
Output:
<?php if ($el->option->display == 'colorbox'): endif ?>
But in this second case where we added another condition
colorbox
will be quoted but image
won't.
Input:
{if $meta->type == image and $el->option->display == colorbox}
{/if}
Output:
<?php if ($meta->type == image and $el->option->display == 'colorbox'): endif ?>
And I think this inconsistent behavior occurs in other situation too, but I can't tell where, now.
Last edited by Cifro (2013-10-06 22:44)