From bcc6caa9df61db941ee28beafef3d809a0f4f8fa Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 1 May 2014 13:59:25 -0400 Subject: [PATCH] Fix $sanitize issue in the build logs view --- static/js/app.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index be76f1664..2fd7aa9b5 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -422,7 +422,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading builderService.getDescription = function(name, config) { switch (name) { case 'github': - var source = $sanitize(UtilService.textToSafeHtml(config['build_source'])); + var source = UtilService.textToSafeHtml(config['build_source']); var desc = ' Push to Github Repository '; desc += '' + source + ''; desc += '
Dockerfile folder: //' + UtilService.textToSafeHtml(config['subdir']); @@ -1594,7 +1594,7 @@ quayApp.directive('entityReference', function () { 'entity': '=entity', 'namespace': '=namespace' }, - controller: function($scope, $element, UserService, $sanitize) { + controller: function($scope, $element, UserService, UtilService) { $scope.getIsAdmin = function(namespace) { return UserService.isNamespaceAdmin(namespace); }; @@ -1612,10 +1612,10 @@ quayApp.directive('entityReference', function () { var org = UserService.getOrganization(namespace); if (!org) { // This robot is owned by the user. - return '/user/?tab=robots&showRobot=' + $sanitize(name); + return '/user/?tab=robots&showRobot=' + UtilService.textToSafeHtml(name); } - return '/organization/' + org['name'] + '/admin?tab=robots&showRobot=' + $sanitize(name); + return '/organization/' + org['name'] + '/admin?tab=robots&showRobot=' + UtilService.textToSafeHtml(name); }; $scope.getPrefix = function(name) { @@ -4110,7 +4110,7 @@ quayApp.directive('dockerfileCommand', function () { scope: { 'command': '=command' }, - controller: function($scope, $element, $sanitize, Config) { + controller: function($scope, $element, UtilService, Config) { var registryHandlers = { 'quay.io': function(pieces) { var rnamespace = pieces[pieces.length - 2]; @@ -4147,11 +4147,11 @@ quayApp.directive('dockerfileCommand', function () { $scope.getCommandTitleHtml = function(title) { var space = title.indexOf(' '); if (space <= 0) { - return $sanitize(title); + return UtilService.textToSafeHtml(title); } var kind = $scope.getCommandKind(title); - var sanitized = $sanitize(title.substring(space + 1)); + var sanitized = UtilService.textToSafeHtml(title.substring(space + 1)); var handler = kindHandlers[kind || '']; if (handler) { @@ -4176,7 +4176,7 @@ quayApp.directive('dockerfileView', function () { scope: { 'contents': '=contents' }, - controller: function($scope, $element, $sanitize) { + controller: function($scope, $element, UtilService) { $scope.$watch('contents', function(contents) { $scope.lines = []; @@ -4191,7 +4191,7 @@ quayApp.directive('dockerfileView', function () { } var lineInfo = { - 'text': $sanitize(line), + 'text': UtilService.textToSafeHtml(line), 'kind': kind }; $scope.lines.push(lineInfo);