You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by "Daniel Dekany (JIRA)" <ji...@apache.org> on 2019/08/18 18:41:00 UTC

[jira] [Closed] (FREEMARKER-109) Invalid function signature - IAE when loading TLD functions with line breaks.

     [ https://issues.apache.org/jira/browse/FREEMARKER-109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dekany closed FREEMARKER-109.
------------------------------------

> Invalid function signature - IAE when loading TLD functions with line breaks.
> -----------------------------------------------------------------------------
>
>                 Key: FREEMARKER-109
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-109
>             Project: Apache Freemarker
>          Issue Type: Bug
>          Components: jsp
>    Affects Versions: 2.3.27-incubating, 2.3.28
>            Reporter: Magnus Leßmann
>            Priority: Minor
>             Fix For: 2.3.29
>
>         Attachments: FreemarkerIssueDemo.java, demo.ftl, demo.tld
>
>
> When a taglib descriptor file contains a function definition with line breaks in the function signature, the TaglibFactory fails to load the taglib with an ``IllegalArgumentException`` complaining about an invalid function signature.
> The pattern ``FUNCTION_SIGNATURE_PATTERN`` from ``TagLibMethodUtil`` does not support function signatures containing newline characters.
> However, having the ability for newline characters is important to maintain readability with the FQNs.
> I did not see any reason why line breaks would be forbidden in TLD files as the taglib can be loaded by our application and [the XML definition clearly states this as allowed|https://www.w3.org/TR/REC-xml/#sec-line-ends]
> I have attached an example. And I believe fixing this will not be that big of a deal.
> Maybe setting the flag ``Pattern.DOTALL`` is enough to resolve this.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)