Support hypen in tag parameter names
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
I'd like to be able to use struts2 tags passing through dynamic attributes that include a hyphen (dash). This would be very helpful because many 3rd party css/js libraries such as JQuery Mobile and Bootstrap use attributes that contain hypens. Unfortunately, Freemarker does not allow parameter names with dashes.
So what I'd like to be able to do is write:
<@s.form ... data-ajax="false"> </@s.form>
This needs incompatible change in the FTL syntax because of ambiguitied causes be that both
=
and==
can be used for comparison. That I plan to get rid of in 2.4 where other FTL baggage will be removed too anyway.Last edit: Dániel Dékány 2014-06-15
Ticket moved from /p/freemarker/bugs/395/
Note that for a while it's possible to do in 2.3.x with putting backslash before the dash:
<@s.form ... data\-ajax="false">
. Not the nicest, but backward compatible...