mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 11:27:36 -02:30
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
This commit is contained in:
committed by
Chris Meyers
parent
e3ac581fdf
commit
0ab1fea731
@@ -14,7 +14,7 @@ $(function() {
|
|||||||
$('span.str').each(function() {
|
$('span.str').each(function() {
|
||||||
var s = $(this).html();
|
var s = $(this).html();
|
||||||
if (s.match(/^\"\/.+\/\"$/) || s.match(/^\"\/.+\/\?.*\"$/)) {
|
if (s.match(/^\"\/.+\/\"$/) || s.match(/^\"\/.+\/\?.*\"$/)) {
|
||||||
$(this).html('"<a href=' + s + '>' + s.replace(/\"/g, '') + '</a>"');
|
$(this).html('"<a href=' + s + '>' + s.replaceAll('"', '') + '</a>"');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ $(function() {
|
|||||||
}).each(function() {
|
}).each(function() {
|
||||||
$(this).nextUntil('span.pun:contains("]")').filter('span.str').each(function() {
|
$(this).nextUntil('span.pun:contains("]")').filter('span.str').each(function() {
|
||||||
if ($(this).text().match(/^\".+\"$/)) {
|
if ($(this).text().match(/^\".+\"$/)) {
|
||||||
var s = $(this).text().replace(/\"/g, '');
|
var s = $(this).text().replaceAll('"', '');
|
||||||
$(this).html('"<a href="' + '?host=' + s + '">' + s + '</a>"');
|
$(this).html('"<a href="' + '?host=' + s + '">' + s + '</a>"');
|
||||||
}
|
}
|
||||||
else if ($(this).text() !== '"') {
|
else if ($(this).text() !== '"') {
|
||||||
|
|||||||
Reference in New Issue
Block a user