Outlook should use "Sanitizer" instead of online service if it is implemented.

Outlook should use "Sanitizer" instead of online service if it is implemented.
0

Upvotes

Upvote

 Jun 17 2023
0 Comments 
New

I am writing an outlook add-in that insert HTML into emails via "Office.context.mailbox.item.setSelectedDataAsync".

 

This function is slow and does not work offline as it has to make a network request to this url:
https://outlook.live.com/owa/0/service.svc?action=SanitizeHtml"

There is a new Sanitizer API that runs locally. It is not yet supported in all browsers at the time of writing, but it should be used in browsers that support it.