1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +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
committed by Jakub Vrana
parent 7238bc7900
commit fdd02a5485

View File

@@ -561,7 +561,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);