0

After use $sanitize to my ng-html-bind, all style was removed. But using $sce.trustAsHtml cause secure issue.

So, is there any way to preserve color after $sanitize?

For Example,

Original string

<p><span style="color: rgb(65, 140, 175);">blue</span></p>

After $sanitize

<p><span>blue</span></p>

The color is also auto removed by stackoverflow, for the example below:

blue

Asoul
  • 996
  • 1
  • 10
  • 22

1 Answers1

0

I'm running into the same issue. trumbowyg formats color as with the OP's example. I'm trying to display that content read-only, and the color is gone. I hope I can figure out a solution without using trustAsHtml, but I doubt it.

john west
  • 646
  • 5
  • 9