groovy
  1. groovy
  2. GROOVY-399

Groovy Template quote escape problem

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Templating
    • Labels:
      None
    • Number of attachments :
      3

      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.

      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

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

              Dates

              • Created:
                Updated: