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

incensistencies when escaping quotes by doubling them

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0
    • 1.7, 2.0
    • Engine
    • None
    • 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

            Unassigned Unassigned
            cbrisson Claude Brisson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: