Questions tagged [angular-dom-sanitizer]

DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing values to be safe to use in the different DOM contexts. Any questions concerning DomSanitizer package

120 questions
3
votes
2 answers

Angular DomSanitizer: Sanitizing Mask-Image Not Working

When providing a background image for an element, everything works fine:
But how can I provide a mask-image for an element? This:
is…
uruk
  • 1,094
  • 2
  • 14
  • 26
3
votes
0 answers

Sanitizing html with Angular DomSanitizer

I'm using Angular 7 and I'm facing a problem with the sanitization system. I'm trying to use the innerHtml directive to insert some Html code in my page. This code can contain html and style attributes. Without using…
flodlc
  • 31
  • 4
3
votes
2 answers

Display by [innerHTML]

I'm trying to have my custom component tags in a string array and bind them by ngfor to the innerhtml property after sanitizing them by calling bypassSecurityTrustHtml... unfortunately the output is always empty, but there is also no sanitize…
Fy Z1K
  • 618
  • 1
  • 7
  • 21
3
votes
1 answer

Angular 5 bypassSecurityTrustUrl is not working

I am trying to have a video with the url being from other site on my Angular 5 application. The video is not being played. var myUrl = "example.com/myvideo.mp4"; var safeUrl = this._sanitizer.bypassSecurityTrustUrl(myUrl); this.videoUrl =…
Ram
  • 51
  • 6
3
votes
1 answer

Sanitizing CSS with Angular's DomSanitizer

I want to sanitize some CSS before I inject it into a