I am using angular v1.5.6. I have some user entered html data along with special characters stored in the database. To illustrate,
var txt = "<span class='txt_bold'> content with <lessthan signs<span> <span>";
var txt1 = "<span class='txt_bold'> content with <4 lessthan >greaterthan signs <span>";
When I put above two lines in ng-bind-html directive I am getting output as below.
txt : content with
txt1 : content with <4 lessthan >greaterthan signs
As we can see word after <(less than) sign from the txt
is removed by directive.
I tried solutions provided in below threads. However, neither of them worked for me to keep html css effect working.
Any hint would be highly appreciated.