From 0ab1fea731a4600914b5b0438e83d81042ffafc5 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Tue, 3 Feb 2026 08:37:55 -0500 Subject: [PATCH] Use replaceAll() for global regex * https://sonarcloud.io/project/issues?open=AZlyqQeaRtfhwxlTsfP0&id=ansible_awx * https://sonarcloud.io/project/issues?open=AZlyqQeaRtfhwxlTsfP1&id=ansible_awx --- awx/static/api/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/static/api/api.js b/awx/static/api/api.js index 67053ae2f6..98d803ad9f 100644 --- a/awx/static/api/api.js +++ b/awx/static/api/api.js @@ -14,7 +14,7 @@ $(function() { $('span.str').each(function() { var s = $(this).html(); if (s.match(/^\"\/.+\/\"$/) || s.match(/^\"\/.+\/\?.*\"$/)) { - $(this).html('"' + s.replace(/\"/g, '') + '"'); + $(this).html('"' + s.replaceAll('"', '') + '"'); } }); @@ -27,7 +27,7 @@ $(function() { }).each(function() { $(this).nextUntil('span.pun:contains("]")').filter('span.str').each(function() { if ($(this).text().match(/^\".+\"$/)) { - var s = $(this).text().replace(/\"/g, ''); + var s = $(this).text().replaceAll('"', ''); $(this).html('"' + s + '"'); } else if ($(this).text() !== '"') {