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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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