Programming Languages: Java, JavaScript
License: BSD License
browse code,
statistics,
last commit on 2013-04-21
svn co https://freemarker.svn.sourceforge.net/svnroot/freemarker freemarker
I have tried this with FF, Chrome and MSIE8, and they don't fail on this, just log the markup as they should. What browser it fails on? (The greater-than sign must be escaped or else you can have a "</script>" in hte string literal.)
2013-05-18 16:51:55 PDT by ddekany
This one also works for me (the tabs are removed). Can you attach a whole template that does this? Are you using some kind of template pre-processing maybe?.
2013-05-18 16:40:17 PDT by ddekany
Works for me. I have tried many combinations, but it gives the expected output, and no parsing error. Can you attach the whole failing template?.
2013-05-18 16:37:20 PDT by ddekany
I used this inside a macro with strip_whitespace=true.
2013-05-17 11:27:54 PDT by finomosec
This expression "${'\\n'}" in a template causes this exception: freemarker.core.ParseException: Token manager error: freemarker.core.TokenMgrError: Lexical error at line 382, column 61. Encountered: "\n" (10), after : "\'\\" in template at freemarker.template.Template.<init>(Template.java:174) at...
2013-05-17 11:26:31 PDT by finomosec
Here: http://freemarker.sourceforge.net/docs/ref_directive_t.html It says: The placement of these directives inside the line has no importance. That is, the effect will be the same regardless if you put the directive at the beginning of the line, or at the end of the line, or in the middle of the line.
2013-05-17 11:11:59 PDT by finomosec
Hi, i have this line in my template (w/o the quotes): " ${'\n'}<#t>" (this is: "\t\t\t${'\n'}<#t>") But the <#t> directive does not work as expected (it should remove the tabs in front of the $ but it doesn't). Similarly this doesn't remove the tabs beind the "}": " <#t>${'\n'} " In order to get it to work as...
2013-05-17 11:09:59 PDT by finomosec
[code]<#assign buttonList = { "a": { "target":"/de/mobile/de/neuwagen.html", "type":"button", "maintext":"Modelle" }, "b": { "target":"/de/mobile/de/pre_owned.html", "type":"button",
2013-05-17 08:48:32 PDT by jaaaap
[code]<#assign hash = hash + {"state":"MI"}/>[/code].
2013-05-17 08:44:55 PDT by jaaaap
I ran across an issue recently where I was taking HTML markup in a variable and assigning it to a string in JavaScript using ${markup?js_string}, but the assignment would break when the markup contained HTML comments. By escaping the right angle bracket in the comment, browsers would throw errors and the script would fail. To remedy this, I had to change the template to...
2013-05-14 17:04:40 PDT by buttaknife