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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
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