Velocity
  1. Velocity
  2. VELOCITY-519

Java escape sequences should work in Velocity macros

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Later
    • Affects Version/s: 1.5 beta2
    • Fix Version/s: 2.x
    • Component/s: Engine
    • Labels:
      None

      Description

      Following test should work:

      ===
      public void testJavaEscape() throws Exception

      { VelocityEngine ve = new VelocityEngine(); ve.init(); Context context = new VelocityContext(); StringWriter writer = new StringWriter(); ve.evaluate(context, writer, "test","#set($v = \"\\u0061\")$v"); assertEquals("a", writer.toString()); writer = new StringWriter(); ve.evaluate(context, writer, "test","#set($v = \"\\n\")$v"); assertEquals("\n", writer.toString()); }

      ===

        Issue Links

          Activity

          Stepan Koltsov created issue -
          Nathan Bubna made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Will Glass-Husain made changes -
          Resolution Won't Fix [ 2 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Stepan Koltsov made changes -
          Link This issue is related to VELOCITY-520 [ VELOCITY-520 ]
          Stepan Koltsov made changes -
          Stepan Koltsov made changes -
          Will Glass-Husain made changes -
          Fix Version/s 1.6 [ 12310290 ]
          Henning Schmiedehausen made changes -
          Component/s Engine [ 12311337 ]
          Nathan Bubna made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Fix Version/s 1.6 [ 12310290 ]
          Fix Version/s 2.0 [ 12310291 ]
          Resolution Later [ 7 ]
          Jarkko Viinamäki made changes -
          Link This issue relates to VELOCITY-709 [ VELOCITY-709 ]
          Mark Thomas made changes -
          Workflow jira [ 12398171 ] Default workflow, editable Closed status [ 12551652 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12551652 ] jira [ 12552530 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development