删除 Netsuite 字符串中的 newline/carriage return 个字符

Remove newline/carriage return characters in Netsuite String

我需要从 Netsuite 中的一个字符串中删除一些空行。

出于各种原因,字符串在 Netsuite 中保持原样是可以的,但我需要为高级 PDF/HTML 模板正确格式化它。

目前在交易表格和 PDF/HTML 模板上,{description} 可以(但不总是)显示为;

Item General description

additional item notes

additional decoration

customization notes

我需要做的是 trim 这个输出(在表单的 SQL 中,或者在模板的 freemarker 中),这样 {description} 就会显示;

Item General description
additional item notes
additional decoration
customization notes

试试这个:

${description?replace("<br /><br />", "<br />")}