1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-30 09:39:51 +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:
Peter Knut
2025-01-29 12:21:56 +01:00
parent 8e2745ab4f
commit 5c9e0f6d5a

View File

@@ -548,7 +548,7 @@ function foreignAddRow() {
this.onchange = function () { };
var selects = qsa('select', row);
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;
}
parentTag(this, 'table').appendChild(row);