mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 23:57:29 +02:00
Modify naming of new foreign rows
Regexp is used to unify implementation with other similar situations. This also prevents false detection in CodeQL security scanning.
This commit is contained in:
@@ -561,7 +561,7 @@ function foreignAddRow() {
|
|||||||
this.onchange = function () { };
|
this.onchange = function () { };
|
||||||
var selects = qsa('select', row);
|
var selects = qsa('select', row);
|
||||||
for (var i=0; i < selects.length; i++) {
|
for (var i=0; i < selects.length; i++) {
|
||||||
selects[i].name = selects[i].name.replace(']', '1]');
|
selects[i].name = selects[i].name.replace(/\d+]/, '1$&');
|
||||||
selects[i].selectedIndex = 0;
|
selects[i].selectedIndex = 0;
|
||||||
}
|
}
|
||||||
parentTag(this, 'table').appendChild(row);
|
parentTag(this, 'table').appendChild(row);
|
||||||
|
Reference in New Issue
Block a user