Hi Michael, Please see my reply inline.
Regards, James On 2020/12/14 08:12:26, Michael Brohl <michael.br...@ecomify.de> wrote: > Hi James, > > I cannot recall having any problems with that during the last 18 years > of running OFBiz projects. > > Can you give us a real world example where this really is a problem? [James] Some advantage of using template literal: 1. The following fragment will be highlighted or blocked by Content-Security-Policy due to the inline event handler. This is not a problem when the fragment is in template literal. <button id="btn" onclick="doSomething()"> 2. Form and its data can be separated / decoupled using template literal. This allows the form to be rendered only once at the server-side. 3. There is also tagged template literal. More about its possible use at https://2ality.com/2011/09/quasi-literals.html > > Besides this, I am not in favour of a forced change in all of the > codebase. Wouldn't it be possible to use both ways, leaving it up to the > developer to use the [=...] Syntax where necessary? [James] Let me check this possibility.. > > Best regards, > > Michael Brohl > > ecomify GmbH - www.ecomify.de > > > Am 12.12.20 um 10:43 schrieb James Yong: > > Hi all, > > > > Currently interpolation syntax used for freemarker template is ${...}. > > This is the same as the interpolation syntax for template literal in > > javascript. > > As a result, extra coding is needed to escape the interpolation expression > > for javascript coding with freemarker template. > > > > Propose to change the use of ${...} to [=...] for freemarker template. > > > > Reference: > > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals > > https://freemarker.apache.org/docs/dgui_misc_alternativesyntax.html#dgui_misc_alternativesyntax_interpolation > > > > Regards, > > James >