在Netsuite中删除换行符/回车符字符串

在Netsuite中删除换行符/回车符字符串

问题描述:

我需要从Netsuite中的一个字符串中删除一些空行。在Netsuite中删除换行符/回车符字符串

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

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

Item General description 

additional item notes 

additional decoration 

customization notes 

我需要做的是修剪这个输出(在表格上的SQL,或在freemarker的为模板),使{description}会再展;

Item General description 
additional item notes 
additional decoration 
customization notes 

试试这个:

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

谢谢!完美的作品。 –

+1

与''替换(“(
){2}”,“
”,“r”)''也可能更安全,因为它与'
'和''和'
'一起使用。 – ddekany