Velocity
  1. Velocity
  2. VELOCITY-709

String literal "\\" parses incorrectly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7, 2.x
    • Component/s: Engine
    • Labels:
      None

      Description

      Given the following VTL:

      #set($var = "
      " )
      #set($var2 = "$

      {var}

      ")

      results in the following parse error:

      Encountered "${" at test.vm[line 2, column 15]
      Was expecting one of:
      <RPAREN> ...
      ...

      the problem is that when parsing the string literal "
      " the second double quote is escaped. This was actually a bug that was introduced in 1.6.x, but I don't think we necessarily need to fix it in that branch.

        Issue Links

          Activity

          Byron Foster created issue -
          Jarkko Viinamäki made changes -
          Field Original Value New Value
          Link This issue is related to VELOCITY-587 [ VELOCITY-587 ]
          Jarkko Viinamäki made changes -
          Link This issue is related to VELOCITY-520 [ VELOCITY-520 ]
          Jarkko Viinamäki made changes -
          Link This issue is related to VELOCITY-519 [ VELOCITY-519 ]
          Jarkko Viinamäki made changes -
          Link This issue is related to VELOCITY-555 [ VELOCITY-555 ]
          Nathan Bubna made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0 [ 12310291 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Workflow jira [ 12453989 ] Default workflow, editable Closed status [ 12551669 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12551669 ] jira [ 12552544 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Byron Foster
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development