mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Custom-encode forward slashes in URL parameters as Apache HTTPD doesn't allow them in some cases. Fixes #3998
This commit is contained in:
committed by
Dave Page
parent
ecbba79c2a
commit
36ffdb93e8
@@ -195,6 +195,22 @@ define(['jquery', 'sources/gettext', 'sources/url_for'],
|
||||
}
|
||||
return '1em';
|
||||
},
|
||||
|
||||
removeSlashInTheString: (value) => {
|
||||
let locationList = [];
|
||||
let idx = 0;
|
||||
while (value && value.indexOf('/') !== -1) {
|
||||
locationList.push(value.indexOf('/') + idx);
|
||||
value = value.replace('/', '');
|
||||
// No of slashes already removed, so we need to increment the
|
||||
// index accordingly when adding into location list
|
||||
idx++;
|
||||
}
|
||||
return {
|
||||
'slashLocations': locationList.join(','),
|
||||
'title': encodeURIComponent(value),
|
||||
};
|
||||
},
|
||||
};
|
||||
return sqlEditorUtils;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user