diff --git a/awx/ui/client/src/job-results/parse-stdout.service.js b/awx/ui/client/src/job-results/parse-stdout.service.js index efba9f1854..229e4ba754 100644 --- a/awx/ui/client/src/job-results/parse-stdout.service.js +++ b/awx/ui/client/src/job-results/parse-stdout.service.js @@ -10,10 +10,18 @@ export default ['$log', function($log){ // correct dom structure prettify: function(line, unstyled){ + line = line + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); + // TODO: remove once Chris's fixes to the [K lines comes in if (line.indexOf("[K") > -1) { $log.error(line); } + if(!unstyled){ // add span tags with color styling line = line.replace(/u001b/g, ''); @@ -32,8 +40,7 @@ export default ['$log', function($log){ //end span line = line.replace(/\[0m/g, ''); - } - else { + } else { // For the host event modal in the standard out tab, // the styling isn't necessary line = line.replace(/u001b/g, ''); @@ -53,6 +60,7 @@ export default ['$log', function($log){ //end span line = line.replace(/\[0m/g, ''); } + return line; }, // adds anchor tags and tooltips to host status lines