Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Escaping Text in FreeMarker
A lot of the fields I need to reference in templates—addresses and company names especially—contain text such as ampersands that needs to be escaped. If I don't escape the text with "?html" I get an Unexpected Error, but this escapes rather too much (it escaped newlines, which is a problem... the tags are visible in the PDF). I'm also then forced to use it everywhere, as I have no way of knowing where else such characters may appear in the future.
I did some research and read about FreeMarker's "ftl" directive, particularly...
<#ftl output_format="XML" auto_esc=true>
0