Fixed an issue where escape character is shown when the server/database name has some special characters. Fixes #5992
parent
b54cf2edca
commit
fb51ef569e
|
@ -25,3 +25,4 @@ Bug fixes
|
|||
| `Issue #5978 <https://redmine.postgresql.org/issues/5978>`_ - Fixed an issue where dynamic tab title has not applied the first time for debugger panel.
|
||||
| `Issue #5983 <https://redmine.postgresql.org/issues/5983>`_ - Added the appropriate server icon based on the server type in the new connection dialog.
|
||||
| `Issue #5985 <https://redmine.postgresql.org/issues/5985>`_ - Fixed an issue where the process watcher dialog throws an error for the database server which is already removed.
|
||||
| `Issue #5992 <https://redmine.postgresql.org/issues/5992>`_ - Fixed an issue where escape character is shown when the server/database name has some special characters.
|
||||
|
|
|
@ -74,20 +74,20 @@ export function setQueryToolDockerTitle(panel, is_query_tool, panel_title, is_fi
|
|||
export function generateTitle(title_placeholder, title_data) {
|
||||
|
||||
if(title_data.type == 'query_tool') {
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%DATABASE%'), title_data.database);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%USERNAME%'), title_data.username);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%SERVER%'), title_data.server);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%DATABASE%'), _.unescape(title_data.database));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%USERNAME%'), _.unescape(title_data.username));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%SERVER%'), _.unescape(title_data.server));
|
||||
} else if(title_data.type == 'datagrid') {
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%DATABASE%'), title_data.database);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%USERNAME%'), title_data.username);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%SERVER%'), title_data.server);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%SCHEMA%'), title_data.schema);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%TABLE%'), title_data.table);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%DATABASE%'), _.unescape(title_data.database));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%USERNAME%'), _.unescape(title_data.username));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%SERVER%'), _.unescape(title_data.server));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%SCHEMA%'), _.unescape(title_data.schema));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%TABLE%'), _.unescape(title_data.table));
|
||||
} else if(title_data.type == 'debugger') {
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%FUNCTION%'), title_data.function_name);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%ARGS%'), title_data.args);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%SCHEMA%'), title_data.schema);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%DATABASE%'), title_data.database);
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%FUNCTION%'), _.unescape(title_data.function_name));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%ARGS%'), _.unescape(title_data.args));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%SCHEMA%'), _.unescape(title_data.schema));
|
||||
title_placeholder = title_placeholder.replace(new RegExp('%DATABASE%'), _.unescape(title_data.database));
|
||||
}
|
||||
|
||||
return _.escape(title_placeholder);
|
||||
|
|
Loading…
Reference in New Issue