Office.context.mailbox.item.body.getAsync returns incorrect HTML for nested lists on Mac Outlook Desktop app #5253
Labels
Area: Outlook
Issue related to Outlook add-ins
Needs: attention 👋
Waiting on Microsoft to provide feedback
Environment
Platform: Mac Desktop
Host: Outlook
Office version number: Microsoft Outlook for Mac Version 16.92 (License: Microsoft 365 Subscription)
Operating System: macOS 15.2 (24C101)
Browser (if using Office on the web): Not applicable
Expected behavior
When using Office.context.mailbox.item.body.getAsync to retrieve the HTML of the email body, the output should preserve the correct formatting of lists, including nested lists (up to third level and beyond). This is what i get from web version of outlook
For example:
The output should not break the list structure when a third-level list item is present.
Current behavior
When using Office.context.mailbox.item.body.getAsync on the Mac Desktop Outlook app, the HTML output breaks nested lists at the third level. Instead of preserving the correct list structure, the third-level item is wrapped in a
tag, causing a new list to be started incorrectly.
Example output:
This behavior only occurs on the Mac Desktop app. The Outlook Web version handles nested lists correctly.
Steps to reproduce
Inspect the retrieved HTML and observe that the third-level list item is incorrectly wrapped in a
tag.
Link to live example(s)
Not applicable (no live link, but repro steps provided above).
Provide additional details
This issue occurs only on the Mac Desktop Outlook app. The issue does not occur when using Outlook on the Web.
Context
I am working on an add-in that processes the HTML body of emails. The incorrect formatting of nested lists disrupts the handling of email content. It leads to unintended list breaks and affects how lists are displayed in our application.
This issue is critical for maintaining consistency between desktop and web versions of our add-in.
Useful logs
The text was updated successfully, but these errors were encountered: