Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-399

Groovy Template quote escape problem

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Templating
    • Labels:
      None

      Description

      The SimpleTemplateEngine got a problem with escaping quotes inside GStrings.

      "this" is tricky: ${hello + " " + hello}
      

      will be parsed to

      out.print("\"this\" is tricky: ${hello + \" \" + hello}");
      

      which is a problem for the current lexer as a GString must be a valid groovy statement.

        Attachments

        1. test-closure.tar.gz
          13 kB
          Niall Gallagher
        2. test.tar.gz
          11 kB
          Niall Gallagher
        3. patch.txt
          1.0 kB
          Thomas Heller

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                maniax Thomas Heller
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: