jte v1.5.0 Release Notes

Release Date: 2020-12-11 // 10 months ago

Previous changes from v1.4.0

    • HTML attributes with a single output that evaluates to an empty string, null, or false, are not rendered. For instance, <span data-title="${null}">Info</span>, will result in <span>Info</span>. The existing feature for HTML boolean attributes is unaffected by this, e.g. <input required="${true}" still renders as <input required> and <input required="${false}"> results in <input>.
    • ๐Ÿ‘€ Content block output in html attributes is escaped. For instance, <span data-title="@This is "the way"!">Info</span> will be rendered as <span data-title="This is &#34;the way&#34;!">Info</span> (See these unit tests for detailled examples)
    • #22 HTML, CSS and js comments are omitted with ContentType.Html
    • ๐Ÿ‘ Experimental utility to concat CSS classes, located in gg.jte.html.support.HtmlSupport
    • ๐Ÿ‘ Allow composition of different HTML policies.
    • Optional HTML policy that forbids single quoted HTML attributes. (gg.jte.html.policy.PreventSingleQuotedAttributes)
    • #20 Optional HTML policy to forbid inline event handlers (gg.jte.html.policy.PreventInlineEventHandlers)
    • #10 improve trimming of control structures, it now also works with ContentType.Html
    • ๐Ÿ›  Fix import statement in css file being misinterpreted as jte import.
    • Compilation error if parameters are passed to a tag without parameters.
    • ๐Ÿ‘ #24 Better error message for param declared without name
    • #15 Allow ClassLoader to be provided to ResourceCodeResolver
    • Map of parameter name, parameter class can be obtained for each jte template. (gg.jte.TemplateEngine#getParamInfo)

    ๐Ÿ”Œ Maven plugin

    • #10 trimControlStructures can be enabled
    • Custom HTML policy can be defined in CompilerMojo, with htmlPolicyClass.