2 people found this helpful
We've run into this problem as well. I think the difference is that the Subject field does not allow / process any type of markup, so it reads the string as-is whereas the Content field will process the contents as html and so will read special characters as those characters and not just a piece of text. One option that I've used in the past is to use a regular expression to replace the "&" with "and" before posting:
contentText = String(contentText).replace(/[&]/g, "and");
The real fix is to reaplace '&' with '&.
even where &'s are typically allowed - in href attributes, you have to make sure you escape them there as well
in python's jinja2 you can use the urlencode filter for encoding the strings.