Fixed the following SonarQube code smells:

1) Do not use Array index in keys.
2) Unnecessary escape character.
3) Rename this local variable to match the regular expression ^[_a-z][a-z0-9_]*$
4) Remove the unused local variable.
This commit is contained in:
Akshay Joshi
2023-06-12 18:44:31 +05:30
parent 3e713cf58b
commit 251bf05692
31 changed files with 136 additions and 117 deletions

View File

@@ -228,8 +228,6 @@ export function initialize(gettext, url_for, _, pgAdmin, csrfToken, Browser) {
let db_label = '';
if(pData.database && pData.database._id) {
db_label = _.escape(pData.database._label.replace('\\', '\\\\'));
db_label = db_label.replace('\'', '\'');
db_label = db_label.replace('"', '\"');
openUrl += `&db=${db_label}`;
} else {
openUrl += `&db=${''}`;