Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS: Possible to sanitize and linky in same directive?

If I try to filter snippet with linky, the input is no longer sanitized / rendered / 'html-ized'. i.e. I want to be able to combine the effects of both:

<div ng-bind-html="snippet"></div>

and

<div ng-bind-html="snippet | linky"></div>

Here is the fiddle: http://jsfiddle.net/5uSnj/

like image 531
brooksbp Avatar asked Nov 12 '22 02:11

brooksbp


1 Answers

linky takes text as input and not html. if you want a filter that takes html as input then it has to work completely differently. please see: https://github.com/angular/angular.js/pull/3285#issuecomment-21958391

like image 170
Igor Minar Avatar answered Nov 14 '22 22:11

Igor Minar