Question
Virtusa Technology Service Company
IN
Last activity: 12 Jul 2023 6:33 EDT
Getting html code in the email body in pulse section
Using Theme cosmos application pega 8.5.2 version
we are using the email listener to creating the cases. The cases got created and getting data successfully but the issue with pulse section. When we click the pulse section in the left side of the screen we can see the email content, in the email body i am seeing unwanted text (HTML code) #999999 1pt;padding:0in 0in 0in 0in;border-spacing:0;min-width:100%">
mostly this was happening when we forwarding an email to pega listener
how can i remove the code in pulse section, can anyone help me on this
Thanks.
@AnushaP1329
HTML code might appear in the Pulse section for text created by an email listener if the email listener is not properly configured to handle HTML content. To resolve this issue, confirm that the "Handle HTML content" field on the "Request" tab of your email service rule is set to "Inline - prefer HTML". Additionally, ensure that you are using a rich text editor control to display the email body in the case.
Email listeners do not process text formatting or images
Alternatively it could be caused by steps required for the following announcement:
Pega Security Advisory - A23 Vulnerability - Remediation Note
Recommended fix for A23 Security Vulnerability caused the pulse posts to display HTML entities instead of the decoded special characters. This is due to the use of an HTML rule to parse the user input before posting it as a pulse message. The resulting text was getting double encoded.
Solution description:
We have a workaround fix for this specific scenario that you can try. Above the added crossScriptingFilter line in your pyPostTextParser include the following in bold:
@AnushaP1329
HTML code might appear in the Pulse section for text created by an email listener if the email listener is not properly configured to handle HTML content. To resolve this issue, confirm that the "Handle HTML content" field on the "Request" tab of your email service rule is set to "Inline - prefer HTML". Additionally, ensure that you are using a rich text editor control to display the email body in the case.
Email listeners do not process text formatting or images
Alternatively it could be caused by steps required for the following announcement:
Pega Security Advisory - A23 Vulnerability - Remediation Note
Recommended fix for A23 Security Vulnerability caused the pulse posts to display HTML entities instead of the decoded special characters. This is due to the use of an HTML rule to parse the user input before posting it as a pulse message. The resulting text was getting double encoded.
Solution description:
We have a workaround fix for this specific scenario that you can try. Above the added crossScriptingFilter line in your pyPostTextParser include the following in bold:
postText= org.jsoup.parser.Parser.unescapeEntities(postText,false);
postText= StringUtils.crossScriptingFilter(postText);
It appears the special characters are getting double encoded when using an HTML rule to process the input first. This fix should decode the special characters before they are run through the crossScriptingFilter method and work as expected.