angularjs-imageupload-directive
angularjs-imageupload-directive copied to clipboard
Unsafe prefix for blob links
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 https://github.com/angular/angular.js/issues/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\//);
});
Thanks for sharing!
+1
It's a pull request https://github.com/angular/angular.js/pull/4623
+1