ng-bind-html-unsafe was removed in Angular 1.2
I\'m trying to implement something where I need to use ng-bind-html-unsafe. In the docs and
Personally I sanitize all my data with some PHP libraries before going into the database so there's no need for another XSS filter for me.
From AngularJS 1.0.8
directives.directive('ngBindHtmlUnsafe', [function() {
return function(scope, element, attr) {
element.addClass('ng-binding').data('$binding', attr.ngBindHtmlUnsafe);
scope.$watch(attr.ngBindHtmlUnsafe, function ngBindHtmlUnsafeWatchAction(value) {
element.html(value || '');
});
}
}]);
To use:
To disable $sce:
app.config(['$sceProvider', function($sceProvider) {
$sceProvider.enabled(false);
}]);