Not sure what the problem might be, but can you check out:

http://www.twig-project.org/book/02-Twig-for-Template-Designers

...particularly the section on "Working with Automatic Escaping".  Try
playing with autoescape on/off and see how that effects the behavior.
Additionally, try using the "|raw" filter on your string literal.  I'd agree
that Twig shouldn't bother to escape string literals, but investigating the
various cases would at least help get to the root of the problem.  You might
also want to consult the twig-users group.

On Wed, Dec 8, 2010 at 7:36 PM, Dennis Jacobfeuerborn <
[email protected]> wrote:

> After updating my app to PR4 I'm seeing a strange case of quotes
> magically appearing in my templates. Consider the following line from
> the twig template:
>
>    <a href="{% path 'list_racks' %}" {{ nav_area == 'rack' ?
> 'class=active' : '' }}>Racks</a>
>
> now if nav_area is set to "rack" this gets rendered as:
>
> .... class="active" ....
>
> Where do the quotes come from?
> To make things more weird changing the template to this:
>    <a href="{% path 'list_racks' %}" {{ nav_area == 'rack' ?
> 'class="active"' : '' }}>Racks</a>
>
> (i.e. adding the quotes manually) results in this:
>
> .... class="&quot;active&quot;" ....
>
> It seems twig no longer treats this as a literal string. Is this
> intended? What if I actually wanted to have 'class=active' rendered
> without the quotes?
>
> Regards,
>  Dennis
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-devs%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>



-- 
jeremy mikola

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to