Questions tagged [ngsanitize]

The `ngSanitize` module provides functionality to sanitize HTML.

See $sanitize for usage.

93 questions
1
vote
1 answer

Can you render HTML dynamically on ngModel without a directive?

I have two different elements, one is a content-editable DIV as a directive where you can enter some HTML such as img tags and it will render automatically on keypress. Secondly I have a textarea which is bound to an ng-model and there I also want…
iQ.
  • 3,811
  • 6
  • 38
  • 57
1
vote
0 answers

Failed to load ngSanitize using angular cdn with the correct src

I'm new to angular JS... I have //HTML src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-sanitize.min.js" //JS var app = angular.module('myApp.view2', ['ngRoute','ngSanitize']) However I received the error message : "either I…
helen
  • 11
  • 1
1
vote
1 answer

Angular ngSanitize / ngDragDrop compatibility

So, I'm working on an Angular application and I have been having problems regarding compatibility between ngSanitize and ngDragDrop. ngDragDrop can be found at http://ganarajpr.github.io/angular-dragdrop/ and ngSanitize at…
1
vote
1 answer

adding ngsanitize to mean.io

I am new to the mean stack and am trying to add ngSanitize. I installed on the command line and see the library inside /bower_components/ but the angular-sanitize.js script isn't loading on the app. Am I missing a step for this? I tried adding…
user1572796
  • 1,057
  • 2
  • 21
  • 46
0
votes
1 answer

`md-highlight-text` not working together with `ng-bind-html`

ngSanitize dependency is not working with ngMaterial dependancy when declaring the app I have declared the module as: var myApp = angular.module('myApp', ['ngTable', 'ngSanitize', 'ngMaterial', 'angularjs-dropdown-multiselect']); I don't get any…
0
votes
2 answers

Use of ngsanitize with css

While using ngsanitize. It displays only html without css applied. For example: The above image should be the output but using ngsanitize ,it displays only the text What could be added with ngsanitize to display elements with proper css.
Poonam Karia
  • 109
  • 1
  • 11
0
votes
0 answers

ngSanitize erases my ng-click, how would I use a directive to replace it?

I have seen many people ask this question, however the answers are so complicated that they do not make sense, neither do the fiddles. I am having an issue with ngSanitize removing my ng-click links on elements. Some say there must be a $compile…
Matthew Walker
  • 193
  • 1
  • 15
0
votes
0 answers

Binding complex rich text element in AngularJS

I'm trying to bind a complex, multiline rich text element with AngularJS, say something like:

Title

Some content

More Content maybe with italics or bold

Even links

Now, when…
Danyx
  • 574
  • 7
  • 34
0
votes
1 answer

Can't bind tag in HTML content. Angular.js

Hello I am trying to bind an HTML string into my div it contains tags too. Bold strings normal strings showing without any problem but my tags coming as string. I am using ng-bind-html with ngSanitize
Suat Karabacak
  • 643
  • 2
  • 7
  • 24
0
votes
1 answer

angular sanitizer and orphan angle bracket in html email content

In my angular app I have applied angular sanitization so invalid html is stripped off(using getTrustedHtml mathod) and valid html goes(HttpPost) to web api. Also HtmlSanitizer in web api is not recommended due to other reasons; so only client side I…
Saurabh
  • 1,545
  • 1
  • 9
  • 9
0
votes
1 answer

Not able to get ng-bind-html to work

Problem: I am trying to use ng-bind-html but I am getting the following errors on the console: The following is the controller where I am calling ngSanitize: and using the following file:
Robert
  • 167
  • 1
  • 2
  • 14
0
votes
1 answer

ngSanitize : badparse for gives bad parse error angularjs

I get a badparse error trying to sanitize gives bad parse error angularjs. I use ngSanitize in my module to sanitize. I am able to parse most HTML content well but this fails. Is there a special reason why this string…
maddie
  • 629
  • 10
  • 29
0
votes
2 answers

AngularJs How to sanitize URL in the controller?

I was wondering if there is a programmatic way of sanitizing (user provided) URLs in AngularJs 1.5. I know there is $sanitize service, which is for sanitizing HTML but I can't find something that would work for URL. Sample Good URL:…
Parth Shah
  • 2,060
  • 1
  • 23
  • 34
0
votes
0 answers

The sanitizer was unable to parse the following block of html: