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

Groovy Template quote escape problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Templating
    • 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. patch.txt
          1.0 kB
          Thomas Heller
        2. test.tar.gz
          11 kB
          Niall Gallagher
        3. test-closure.tar.gz
          13 kB
          Niall Gallagher

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: