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

Daniel Dekany resolved FREEMARKER-109.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.29

Thanks! Fix committed for the next release.

> 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.3#76005)

Reply via email to