Hi
In our application, we need to display the emails read from uses inbox and display them in UI. Some of the emails are not formatted properly.
When try to display, it displays message
here is that html
The incoming emails are unpredictable and we need to display in any case.
before using in ng-bind-html
we are using like this too
message = $sce.getTrustedHtml($sce.trustAsHtml(message));
and in html
we render like
<div ng-bind-html="message">
</div>
But it displays the above sanitize error. How to over come this?
Some of the solutions may be
1. while pulling from user inbox itself, parse html and correct it by using some java libraries like Jsoup, HtmlCleaner - but as the email text is unpredictable, we may lose some formatting etc..