Hi does any one encounter this issue? I'm trying ...
# advancedpdf
l
Hi does any one encounter this issue? I'm trying to get the value from address sub-field into a custom field and than to an email template, the issue is that I get "control characters" showing up in the OUTLOOK mail but not on chrome-GMAIL, i tired some regex with no help
Copy code
addressOld.toString().replace(/[\u0000-\u001F\u007F-\u009F\u200B]/g, " ").replace(/[\n\r\t]/g, " ").replace(/[^a-zA-Z0-9 ]/g, ' ').replace(/[^\x20-\x7E]/g, ' ').replace(/(\r\n|\n|\r)/gm," ").replace(/((?!.)\s)+/g, " ").replace(/[\r\n\x0B\x0C\u0085\u2028\u2029]+/g," ")
ops, didn't finish the message the screen shot from the gmail output
Fixed it, in the FreeMaker code: ${str?replace('\\p{Cntrl}', ' ', 'r')}