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

incensistencies when escaping quotes by doubling them

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.7, 2.0
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      any

      Description

      The template:

      #set($double_double = """") ## ok
      #set($single_single = '''') ## ok
      #set($double_single = "''") ## strange, equals "'"
      #set($single_double = '""') ## strange, equals '"'
      double_double = $double_double
      single_single = $single_single
      double_single = $double_single
      single_double = $single_double

      renders as:
      "
      '
      '
      "

      whereas one would expect:
      "
      '
      ''
      ""

      More readily, one would expect single quotes doubling mechanism and double quotes doubling mechanism to only be active inside single quotes and double quotes, respectively.

        Attachments

        1. velocity-785.patch
          4 kB
          Jarkko Viinamäki

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              claude Claude Brisson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: