I need to parse a string using ng-bind-html. This string contains some custom html tags in it. Which while parsing using ng-bind-html gives me an error for $sanitize:badparse.
Please see the fiddle for error: http://jsfiddle.net/8zS4h/2/
While reading questions in stackoverflow and in google I found that there could be a solution if I use $sce.trustAsHtml()
.
This solves my error issue but couldn't parse my custom html element. You can see this updated fiddle here: http://jsfiddle.net/8zS4h/3/
I am scratching hard my head to find a solution.
EDIT :
Just to add more info, I am getting this string from a rss feed, so sometimes it can have "<http>"
or "<http"
tags also. Which is where it is failing.
So if the string is like <http://www.<em>whitehouse</em>.gov/omb/circulars/a076/
should gives output like http://www.<em>whitehouse</em>.gov/omb/circulars/a076/