Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-5945

Using opening angle brackets twice in expression language leads to token recognition error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • Scripting Sightly Engine 1.0.18
    • Scripting
    • None

    Description

      The following Sightly expression leads to an exception when used inside a block element's content

       ${'<{0}> </{0}>' @ format=['myelement'], context='unsafe'}
      

      .
      The error is

      token recognition error at: ''<{0}>' for expression ${'<{0}>
      	at org.apache.sling.scripting.sightly.impl.engine.UnitLoader.getSourceCodeForScript(UnitLoader.java:135)
      

      On the other hand

       ${'<{0} /> ' @ format=['myelement'], context='unsafe'}
      

      works without any issues.

      Attachments

        Activity

          People

            radu Radu Cotescu
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: