title: how to sanitize url for angular 4
body: <p>I'm trying to use the Object html tag to display a PDF that i made server side, but when i hard code the url it works and when i put it in a variable it gives me an Angular error and nothing is shown : <br></p>
  
  <pre><code>unsafe value used in a resource URL context
  </code></pre>
  
  <p>i tried using the sanitizer first but i read that it should be used only with tags that support <code>href / src</code> in my case it's data like this : 
  <br></p>
  
  <pre><code>&lt;object data="{{pdfSrc}}" type="application/pdf" width="100%" height="100%"&gt;
  
      &lt;/object&gt;&lt;br&gt;
  </code></pre>
  
  <p>Here is what i tried  first : <br></p>
  
  <pre><code>pdfSrc: any =this.sanitizer.bypassSecurityTrustUrl('http://my_url.com') ;
  </code></pre>
  
  <p>thank you </p>