Remove unsafe: from links with navprams

In my web app you have the option to download iPA’s OTA onto your iOS device. I made it easier for me by using NavParams (so I don’t have to make individual pages for every iPA) but in order to download any iPA OTA apple has a special protocol itms-services:/// when I pass this as item.url and click download it adds unsafe: to the beginning and makes the download URL invalid. I was wondering if there is anyway to make the protocol itms-services:/// safe. I found Dom Sanitization Service and have tried using it but have had trouble getting it to work. If there isn’t any other way could someone explain Dom Sanitization Service for me.

For ionic 2 rc After a long day of searching Here comes the solution


copied here
For anyone experiencing this issue, I have ‘solved’ it by using the following:

Class:

import {DomSanitizer} from ‘@angular/platform-browser’;

constructor(private DomSanitizer: DomSanitizationService) {}
Template file:

<img [src]=“DomSanitizer.bypassSecurityTrustUrl(imgSrcProperty)”/>

Where imgSrcProperty is the offending image base64 encoded.