title: Sanitize Blob Url in Angular 4 by DomSanitizer
body: <p>The idea is to embed a pdf file on angular side that is being returned by node express server in blob form.
  <a href="https://i.stack.imgur.com/Lsq9y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lsq9y.png" alt="file is returned in the form of blob"></a></p>
  
  <p>After then i get the image and created a URL   </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const file = new Blob([this.data], { type: 'application/pdf' });
  this.fileUrl = URL.createObjectURL(file);
  this.protectedUrl = this.sanitizer.bypassSecurityTrustUrl(this.fileUrl);</code></pre>
  </div>
  </div>
  </p>
  
  <p>And then after i use this in html</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;object ng-show="content" data="{{protectedUrl}}" type="application/pdf" style="width: 100%; height: 400px;"&gt;&lt;/object&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://i.stack.imgur.com/iiXzO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iiXzO.png" alt="and then even after using the sanitizer angular is returning the cleaning url problem"></a></p>