Hi Chris,
If I'm correct you want to remove the new lines? If so I would suggest the replaceAll() function.
To delete new line characters it would look something like this: replaceAll('$entitiy/string', '([\r?\n])', ' ')
It takes 3 arguments: the string to search in, RegEx to match with and the string to replace it with. The \r is to make it more flexible to match different types of line endings (such as Windows-style CRLF or Unix-style LF)
https://docs.mendix.com/refguide/string-function-calls/