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

Escaping in form of "$\!{foo}" does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Later
    • 1.4
    • None
    • Engine
    • None
    • Operating System: All
      Platform: PC
    • 28528

    Description

      Below are the results of executing app_example1 with a modified "example.vm"
      file. The content of the example.vm is a copy-paste from Velocity UserĂ¢??s Guide
      (see the URL). Note that "$!

      {foo}" was rendered to "$Unable to render embedded object: File ({", instead of "$) not found.{foo}

      "
      as expected:

      D:\dev\velocity-1.4\examples\app_example1>type example.vm
      #set( $foo = "bar" )
      $!foo
      $!

      {foo}

      $
      !foo
      $\\\!foo

      D:\dev\velocity-1.4\examples\app_example1>example
      Using classpath: .;..\..\bin\velocity-1.4.jar;..\..\bin\velocity-dep-1.4.jar
      $!foo
      $!{
      $!foo
      $
      !foo
      D:\dev\velocity-1.4\examples\app_example1>

      Surprisingly, I could really use this feature as I want to evaluate my
      template in two steps: cache the result of the first generic step and then
      reuse it to generate various final messages.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              omerlugov@hotmail.com oleg
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: