Menu

#68 JETT exception when a tag with body contains an < character

1.0
closed
None
2018-05-31
2016-05-17
No

This is similar to Ticket #58 [https://sourceforge.net/p/jett/tickets/58/]: if I've a tag with body where the body contains an < character that will fail with an exception, probably because of the incorrect parsing of the JETT tags' start and end.

This is serious for me: I've added a custom tag which evaluates its body as groovy expression. Then this is always fails if I've some groovy/java code like: if (this<that).

I've attached an example Excel template, which contains this tag:

<jt:null>apple < banana</jt:null>

When evaluating the template I get this exception:

net.sf.jett.exception.TagParseException: Matching tag not found for tag: <jt:forEach items="${items}" var="item">, located at Munka1!A2, within block Block: left=0, right=3, top=0, bottom=1, direction=NONE
at net.sf.jett.transform.CellTransformer.transformCellTag(CellTransformer.java:267)
at net.sf.jett.transform.CellTransformer.transform(CellTransformer.java:124)
at net.sf.jett.transform.BlockTransformer.transform(BlockTransformer.java:72)
at net.sf.jett.transform.BlockTransformer.transform(BlockTransformer.java:34)
at net.sf.jett.transform.SheetTransformer.transform(SheetTransformer.java:148)
at net.sf.jett.transform.SheetTransformer.transform(SheetTransformer.java:74)
at net.sf.jett.transform.ExcelTransformer.transform(ExcelTransformer.java:416)
at net.sf.jett.transform.ExcelTransformer.transform(ExcelTransformer.java:391)

1 Attachments

Discussion

  • Randy Gettman

    Randy Gettman - 2017-03-24

    The problem here was that JETT was giving up on the rest of the text in the cell when it encountered a '<' that wasn't the start of a tag.

    I have checked in code that makes JETT continue with the rest of the cell text in this case.

    It will be part of the next JETT build.

     
  • Randy Gettman

    Randy Gettman - 2018-05-31
    • status: open --> closed
     
  • Randy Gettman

    Randy Gettman - 2018-05-31

    This was included in JETT 0.11.0, which was released on May 14, 2018.

     

Log in to post a comment.