Velocity
  1. Velocity
  2. VELOCITY-264

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Later
    • Affects Version/s: 1.4
    • Fix Version/s: 2.x
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC

      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.

        Issue Links

          Activity

          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12551885 ] jira [ 12552672 ]
          Mark Thomas made changes -
          Workflow jira [ 12325139 ] Default workflow, editable Closed status [ 12551885 ]
          Henning Schmiedehausen made changes -
          Resolution Later [ 7 ]
          Fix Version/s 1.5 [ 12310253 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0 [ 12310291 ]
          Will Glass-Husain made changes -
          Environment Operating System: All
          Platform: PC
          Operating System: All
          Platform: PC
          Bugzilla Id 28528
          Fix Version/s 1.5 [ 12310253 ]
          Assignee Velocity-Dev List [ velocity-dev@jakarta.apache.org ]
          Priority Major [ 3 ] Minor [ 4 ]
          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 "$!{", instead of "$!{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.
          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 "$!{", instead of "$!{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.
          Will Glass-Husain made changes -
          Link This issue is duplicated by VELOCITY-251 [ VELOCITY-251 ]
          Jeff Turner made changes -
          Field Original Value New Value
          issue.field.bugzillaimportkey 28528 12315134
          oleg created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              oleg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development