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

Unsafe prefix for blob links #12

Open
mankindsoftware opened this issue Oct 1, 2013 · 4 comments
Open

Unsafe prefix for blob links #12

mankindsoftware opened this issue Oct 1, 2013 · 4 comments

Comments

@mankindsoftware
Copy link

Came upon an "unsafe" blob prefix that resulted in a broken image for {{image.url}}.
However, {{image.dataURL}} worked nicely in it's place.

The cause and work-around is documented in angular/angular.js#3889.

My environment:

  • Angular version 1.2.0-rc.2
  • Chrome Version 29.0.1547.76 m

The following was the recommended fix in this case and it works for me:

myModule.config(['$compileProvider', function($compileProvider) {
    var oldWhiteList = $compileProvider.imgSrcSanitizationWhitelist();
    $compileProvider.imgSrcSanitizationWhitelist(/^\s (https|ftp|file|blob):|data:image\//);
});
@johannesjo
Copy link

Thanks for sharing!

@sloops77
Copy link

+1

@ricricucit
Copy link

It's a pull request angular/angular.js#4623

@ZhangBohan
Copy link

+1

Repository owner deleted a comment from adewalee-bot Feb 23, 2024
Repository owner deleted a comment from adewalee-bot Feb 23, 2024
Repository owner deleted a comment from DavideStagni Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@ricricucit @mankindsoftware @johannesjo @ZhangBohan @sloops77 and others