I had content being inserted by personalization ( %%CONTENT%%) into the body of an email. The content at times contained some special characters like em-dashes and en-dashes, and those characters don’t always render properly in some email clients.
The solution was to look for those characters and REPLACE them with their HTML entity.
First, create a varible.
Then set the variable to the value of the “CONTENT” field in the database/list.
SET @content = CONTENT
Then use the REPLACE function to find and replace:
SET @content = REPLACE(@content,CHAR(8212),’—’)
SET @content = REPLACE(@content,CHAR(8211),’–’)
Thank you for reading!