You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <de...@velocity.apache.org> on 2008/09/24 21:01:49 UTC

[jira] Resolved: (VELOCITY-616) Escaping of directives does not work if the directive is in curly brackets

     [ https://issues.apache.org/jira/browse/VELOCITY-616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna resolved VELOCITY-616.
-----------------------------------

    Resolution: Fixed

> Escaping of directives does not work if the directive is in curly brackets
> --------------------------------------------------------------------------
>
>                 Key: VELOCITY-616
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-616
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>            Reporter: Alik
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: Velocity616TestCase.java
>
>
> To escape a directive, one must precede it with an escape backslash. According to the documentation:
>    \#if ($foo)
>       \$bar
>    \#end
> Should render as
>    #if $foo)
>       $bar
>    #end
> And it does. 
> However, if you enclose the directive in curly brackets, the escape is ignored:
>    \#{if} ($foo)
>       \$bar
>    \#{end}
> Ignores the escape and evaluates to
>    \
> (assuming $foo is false).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org