Thank you for your post.
Does the script work properly if performed locally?
Is this occurring for all records or just specific records?
If you have a mixture of styles in the text field (e.g., plain text with bold text), does it then work?
Any other information you can provide may be helpful in replicating the issue.
I am sorry, it was another mistake that led to my assumption that there is an error in fms. I am sorry for the inconvenience caused. Everything is working fine.