Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-616

Escaping of directives does not work if the directive is in curly brackets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5
    • 1.6
    • Engine
    • None

    Description

      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).

      Attachments

        1. Velocity616TestCase.java
          2 kB
          Nathan Bubna

        Activity

          People

            Unassigned Unassigned
            veliashberg Alik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: