Skip to content

Unsafe prefix for blob links #12

Description

@mankindsoftware

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\//);
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions