From 4e057f6c4575ff6e334f30e966ee967c8e54478c Mon Sep 17 00:00:00 2001 From: mabashian Date: Tue, 25 Jul 2017 09:53:18 -0400 Subject: [PATCH] Sanizite node resource name on hover --- .../workflows/workflow-chart/workflow-chart.directive.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js b/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js index e17ef5bba7..b650bdd5ed 100644 --- a/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js +++ b/awx/ui/client/src/templates/workflows/workflow-chart/workflow-chart.directive.js @@ -4,8 +4,8 @@ * All Rights Reserved *************************************************/ -export default ['$state','moment', '$timeout', '$window', - function($state, moment, $timeout, $window) { +export default ['$state','moment', '$timeout', '$window', '$filter', + function($state, moment, $timeout, $window, $filter) { return { scope: { @@ -363,7 +363,7 @@ export default ['$state','moment', '$timeout', '$window', }); // Render the tooltip quickly in the dom and then remove. This lets us know how big the tooltip is so that we can place // it properly on the workflow - let tooltipDimensionChecker = $(""); + let tooltipDimensionChecker = $(""); $('body').append(tooltipDimensionChecker); let tipWidth = $(tooltipDimensionChecker).outerWidth(); let tipHeight = $(tooltipDimensionChecker).outerHeight(); @@ -376,7 +376,7 @@ export default ['$state','moment', '$timeout', '$window', .attr("height", tipHeight+20) .attr("class", "WorkflowChart-tooltip") .html(function(){ - return "
" + resourceName + "
"; + return "
" + $filter('sanitize')(resourceName) + "
"; }); } d3.select("#node-" + d.id)