I have the following Rich Text Editor field inside my sharepoint online with internal name = "ApproverFeedbackandnotesPowerBi":-
and inside my remove event receiver i am checking the Current Value of this field against the After value as follow:-
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
SPRemoteEventResult result = new SPRemoteEventResult();
using (ClientContext clientContext = TokenHelper.CreateRemoteEventReceiverClientContext(properties))
{
try
{
if (clientContext != null)
{
ListItem currentItem = clientContext.Web.GetList(clientContext.Web.ServerRelativeUrl + "/lists/ApprovalProcess").GetItemById(properties.ItemEventProperties.ListItemId);
clientContext.Load(currentItem);
clientContext.ExecuteQuery();
if (properties.ItemEventProperties.AfterProperties["ApproverFeedbackandnotesPowerBi"].ToString() != (currentItem["ApproverFeedbackandnotesPowerBi"] == null ? null : ToString())
)
{
}
}
now the check will always fails, so when i debug my code i have noted that the currentItem["ApproverFeedbackandnotesPowerBi"] will always have extra html tag (`<div class="ExternalClassD7C94EE0628F493686BC675B96532912">`), for example, in one case the currentItem["ApproverFeedbackandnotesPowerBi"] =
<div class="ExternalClassD7C94EE0628F493686BC675B96532912">🟡Abstain By:- . Comment:- Nothing was attached..<br>✅Approved By:- . Comment:-...<br><br></div>
while the properties.ItemEventProperties.AfterProperties["ApproverFeedbackandnotesPowerBi"] =
🟡Abstain By:- . Comment:- Nothing was attached..<br>✅Approved By:-. Comment:-...<br><br>
so can anyone advice why this is happening? and how i can fix it, so my comparison will work correctly?