I get html code from API lines that can contain embedded videos from the following services:
- youtube.com,
- vimeo.com,
- dailymotion.com,
- prezi.com
If I'm sure it is safe enough, I can convert them to a reliable SafeHtml (to bypass Angular sanitizer):
this.safeHtml = this._sanitizer.bypassSecurityTrustHtml(this.htmlFromApi);
And then put it on a page like this:
<div [innerHtml]="safeHtml"></div>
Questions:
What checks should I do to make sure this line is safe enough? (it does not contain built-in scripts and leads only to one of these four sites without any complicated redirects)?
Does it make sense to somehow add these sites to Angular sanitizer exceptions? And how to do it, if so?
Thanks in advance!
p.s. : , HTML? , - Angular