Using Angular 13, I have a dynamic URL that loads into an iframe's SRC attribute. I need to sanitize this url (of course) before hand. I tried the following (pseudo code):
DomSanitizer.sanitize(SecurityContext.RESOURCE_URL, 'myurl')
This throws the following error:
unsafe value used in a resource URL context
I cannot use the bypassSecurityTrustResourceUrl as SonarQube marks it as a Security Hotspot. This is what I'm trying to fix.
Most of the examples I've found here recommend using the bypass and I wanted to know if there was a way not to do so.
Thanks in advance