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

Java escape sequences should work in Velocity macros

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Later
    • Affects Version/s: 1.5 beta2
    • Fix Version/s: None
    • 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()); }

      ===

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: