1

I am using CKeditor in Java for sending email functionality. But when I am trying to add an HTML by clicking source, there is no issue in first case but after clicking Next and going Back to the same page, I am getting some Special characters as ÃÂ ÃÂ ÃÂ |ÃÂ ÃÂ ÃÂ. I am using following code to set the email content. I have tried all the following options one by one but none is working.

nCamp.setEmailContent(StringEscapeUtils.escapeHtml3(campaign.getEmailContent()).toString());

nCamp.setEmailContent(StringEscapeUtils.escapeHtml4(campaign.getEmailContent()).toString());

nCamp.setEmailContent(StringEscapeUtils.unescapeHtml4(campaign.getEmailContent()).toString());

HTML page view when added first time: HTML page view when added first time

Getting Special Characters ÃÂ ÃÂ ÃÂ |ÃÂ ÃÂ ÃÂ after going back: Getting Special Characters ÃÂ ÃÂ ÃÂ |ÃÂ ÃÂ ÃÂ after going back

These characters are also reflected in my emails. Also more times I go back to the source page, the characters are dupliating each time.

Rowland Shaw
  • 37,700
  • 14
  • 97
  • 166
Vaibhav Sah
  • 142
  • 1
  • 10
  • What does "going back" mean in this instance? Have you saved it somewhere like a database and reloaded it? – Rowland Shaw Oct 07 '15 at 11:22
  • By Going Back means, When I am clicking on Next Step button as you can see above, there is one more page where i fill the details regarding saving or sending mails. From that page I am clicking again on Back button similar as above to recheck or edit my contents. But at that time it is again loading the editor with contents, which is as expected and thus parsing again using the stringescaeutils class. This time the &nbsp and other special characters such as "!" are converted to ÃÂ Ã – Vaibhav Sah Oct 07 '15 at 11:30
  • This is a default for most editors for characters that they do not understand, so they place that symbol. I am not sure exactly what your issue is, but I would check the HTML to make sure that A.) there is no special formatting or unique characters used (e.g. copy/pasted from Word) and B.) that the editor is able to understand and represent these characters. As it sounds, the initial works fine, but when you go back and reload, it fails. This sounds like the editor recreates the character after hitting 'next' to its own format, but when you push back it cannot render it right. – Gortonington Oct 08 '15 at 14:36

0 Answers0