src iframe error

Asked

Viewed 100 times

0

my code:

<div class="col-md-3 col-sm-4 col-xs-6" *ngFor="let g of gag">
    <div *ngIf="g.tipo == 2">
      <iframe width="280" height="162" [src]="g.caminho" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen ></iframe>
    </div>
</div>

and the error shown in the console:

ERROR Error: unsafe value used in a resource URL context (see http://g.co/ng/security#xss)
at DomSanitizerImpl.push../node_modules/@angular/platform-browser/fesm5/platform-browser.js.DomSanitizerImpl.sanitize (platform-browser.js:1812)
at setElementProperty (core.js:8260)
at checkAndUpdateElementValue (core.js:8212)
at checkAndUpdateElementInline (core.js:8159)
at checkAndUpdateNodeInline (core.js:10503)
at checkAndUpdateNode (core.js:10469)
at debugCheckAndUpdateNode (core.js:11102)
at debugCheckRenderNodeFn (core.js:11088)
at Object.eval [as updateRenderer] (GaleriaComponent.html:24)

Can anyone tell me how to fix the mistake?

  • 1

    The log already tells you where to find information: http://g.co/ng/security#xss

1 answer

1


Browser other questions tagged

You are not signed in. Login or sign up in order to post.