Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"local" protocol should be included in imgSrcSanitizationWhitelist #1066

Closed
ghost opened this issue Apr 7, 2014 · 5 comments
Closed

"local" protocol should be included in imgSrcSanitizationWhitelist #1066

ghost opened this issue Apr 7, 2014 · 5 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Apr 7, 2014

This issue was discovered when testing an app built using ionic, packaged in Cordova running on BlackBerry 10. I believe the WebView on BlackBerry 10 injects the "local://" protocol when it tries to render the relative URLs of images packaged inside the Cordova app container.

Looking through ionic.bundle.js, I found the imgSrcSanitizationWhitelist variable which contains a list of accepted protocols. I would like to ask that "local" be included in the next version.

Observations
The following template

<img ng-src="img/thumbs/{{item.path}}"/>

results in images that generate the following error when run on BlackBerry 10

GET unsafe:local:///img/thumbs/nature.jpg Unhandled Protocol
@ghost
Copy link
Author

ghost commented Apr 7, 2014

Update: meant to include, when I manually change ionic.bundle.js to include the "local:" protocol in the imgSrcSanitizationWhitelist, my images display just fine on BlackBerry 10.

@mlynch
Copy link
Contributor

mlynch commented Apr 7, 2014

This is actually a great time to ask if Ionic works on Blackberry 10 :)

How does it work for you, apart from this issue?

I'll take a look about adding that right now.

@mlynch mlynch self-assigned this Apr 7, 2014
@mlynch mlynch added this to the 1.0.0-beta.2 milestone Apr 7, 2014
@mlynch
Copy link
Contributor

mlynch commented Apr 7, 2014

Oh, and this is actually an Angular bug, not Ionic. We don't have any line for imgSrcSanitizationWhitelist. You can override it manually, and perhaps Angular will add support for it later. But for now we are going to keep this out of Ionic proper.

@mlynch mlynch closed this as completed Apr 7, 2014
@ghost
Copy link
Author

ghost commented Apr 7, 2014

Thanks for the update. Good to know this is an Angular issue.

Ionic works great on BlackBerry 10. This was the only issue I encountered and I just finished the app.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant