Freemarker string escaping doesn't work with default operator -
We use Freemarker 2.3.20 and come in a strange behavior when using the default operator to escape this way With string:
$ {picture. Author [0]! ""? Js_string} In this case, quotes are not saved in the value of the authors! " "is present.
We need to check the first value and the default session can not be used:
& lt; #if pic. Author @ [0]? ? & Gt; {. Picture @ author [0] js_string?} $ & Lt; / # If & gt; It is quite ugly and has blown the code.
Is this a bug or a feature?
This operator is due to priority $ {picture. Author [0]! ""? Js_string} means $ {picture}. Author [0]! (""? Jsistring)} What do you want $ {(author. @ Author [0]! "")? Js_string} .
Comments
Post a Comment