SAP Knowledge Base Article - Public

3736777 - MemoActivityTextCollection contains encoded HTML tags

Symptom

  • The OData API returns the FormattedText field of the ActivityText entity with double-encoded HTML tags (HTML entities).
  • A consuming third-party system cannot interpret the text correctly, resulting in unreadable content.
  • The behavior is reproducible across tenants.

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Run a GET request on ServiceRequestCollection to retrieve the ticket id.
  2. Extract the related activity id from the response.
  3. Run a GET request on ActivityCollection using the extracted activity id.
  4. Review the FormattedText field in the ActivityText payload and observe the double-encoded HTML entities.

Cause

The FormattedText field in the ActivityText entity contains double-encoded HTML tags that are standard HTML entities.

Resolution

  1. Implement HTML entity decoding on the consumer side before processing or rendering the FormattedText field.
  2. Use a standard HTML entity decoder available in the integration or application layer (for example, a built-in library or utility in your programming language).
  3. Validate the decoded output to ensure the expected HTML structure is restored and can be parsed/rendered by the consuming system.
  4. Note that the OData API returns FormattedText in its default encoding and this behavior cannot be changed currently.

See Also

Keywords

odata, activitytext, formattedtext, html entities, decode html, text encoding, memoactivitytext , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer core applications all versions