Hello,

I am unable to display unsanitized text in the view .

In the book I'm reading this looks very easy: just use ng-bind-html-unsafe 
and Angular will not sanitize the input string meaning that any markup will 
be executed by the browser. 

I have this:

.controller("AddDomElementsController",
    function ($scope){
        $scope.unsafe = "Hello from a <h1>very</h1> <b>unsafe</b> 
directive!!!"
        ....
})

and this in the view

<label for="unsafe">unsafe</label><input ng-model="unsafe"> = <p 
ng-bind-html-unsafe="unsafe"></span>

which displays as:

unsafe = (with the html escaped string in the input field). So _no_ output 
where I expect it to be 

If I do 

<label for="unsafe">unsafe</label><input ng-model="unsafe"> = <p 
ng-bind-html-unsafe="unsafe"></span>, using ng-bind, instead of 
ng-bind-html-unsafe I get 

unsafe = 

Hello from a <h1>very</h1> <b>unsafe</b> directive!!!
Is it possible to have Angular 1.0.2 _not_ escape a string?

Btw I tried ng-bind-html and ng-bind-html-unsafe.

Marc

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to