Hi, I upgraded from version 2.x to 4.x and get the following error when tapping on any links in my cordova app:
External navigation rejected - <allow-intent> not set for url='unsafe:ionic...
I suppose I could add <allow-intent> for unsafe:ionic:// but I'm guessing this isn't expected behavior. Reverting to 2.x fixes the issue.
cordova 9.0
cordova-ios 5.0.1
This is not cordova-plugin-ionic-webview issue. unsafe: prefix added by angular
as explained by cmbilisim, the unsafe is added by angular, so you should configure it to not do it, or build your app in a different way so it doesn't have links to ionic://, not sure how you are using it, but you usually have a router to navigate instead of having links to other pages
Thanks. For anyone who stumbles upon this, you need to use something like this...
.config(function ($compileProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|tel|ionic):/);
})
Thank you @jamesdixon You saved my day. What was causing this error? Can you explain please?
Most helpful comment
Thanks. For anyone who stumbles upon this, you need to use something like this...