From 1d74ddd5ea60ad5b17fc41d386e4d09f7d237441 Mon Sep 17 00:00:00 2001 From: mcfedr Date: Thu, 24 Oct 2013 16:52:58 +0300 Subject: [PATCH] fix($compile): Allow blob urls in images Urls created using URL.createObjectURL were previously blocked and marked as unsafe --- src/ng/compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 2ff9144bc232..fce94fbff645 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -488,7 +488,7 @@ function $CompileProvider($provide) { COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/, CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/, aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/, - imgSrcSanitizationWhitelist = /^\s*(https?|ftp|file):|data:image\//; + imgSrcSanitizationWhitelist = /^\s*(https?|ftp|file|blob):|data:image\//; // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes // The assumption is that future DOM event attribute names will begin with