Index: gm/rebaseline_server/static/live-loader.js |
diff --git a/gm/rebaseline_server/static/live-loader.js b/gm/rebaseline_server/static/live-loader.js |
index 30d05061be6fa9dd4ab9b2a7a9e9d375de66553d..ab15aee41a984c782481f3a68e09d96579b7b4a7 100644 |
--- a/gm/rebaseline_server/static/live-loader.js |
+++ b/gm/rebaseline_server/static/live-loader.js |
@@ -8,6 +8,12 @@ var Loader = angular.module( |
['ConstantsModule'] |
); |
+// This configuration is needed to allow downloads of the diff patch. |
+// See https://github.com/angular/angular.js/issues/3889 |
+Loader.config(['$compileProvider', function($compileProvider) { |
+ $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|file|blob):/); |
+}]); |
+ |
Loader.directive( |
'resultsUpdatedCallbackDirective', |
['$timeout', |
@@ -841,6 +847,8 @@ Loader.controller( |
data: modificationData |
}).success(function(data, status, headers, config) { |
$scope.diffResults = data; |
+ var blob = new Blob([$scope.diffResults], {type: 'text/plain'}); |
+ $scope.diffResultsBlobUrl = window.URL.createObjectURL(blob); |
$scope.submitPending = false; |
}).error(function(data, status, headers, config) { |
alert("There was an error submitting your baselines.\n\n" + |