Fixed an issue where an operation error message pop up showing the database object's name incorrectly. Fixes #7078

pull/64/head
Nikhil Mohite 2021-12-28 13:49:04 +05:30 committed by Akshay Joshi
parent 603d91be0e
commit 191e2b6242
6 changed files with 10 additions and 8 deletions

View File

@ -22,3 +22,4 @@ Bug fixes
| `Issue #7003 <https://redmine.postgresql.org/issues/7003>`_ - Fixed an issue where Explain Analyze shows negative exclusive time.
| `Issue #7034 <https://redmine.postgresql.org/issues/7034>`_ - Fixed an issue where Columns with default value not showing when adding a new row.
| `Issue #7077 <https://redmine.postgresql.org/issues/7077>`_ - Fixed an issue where the Owner is not displayed in the reverse engineering SQL for Procedures.
| `Issue #7078 <https://redmine.postgresql.org/issues/7078>`_ - Fixed an issue where an operation error message pop up showing the database object's name incorrectly.

View File

@ -233,7 +233,7 @@ define('pgadmin.node.database', [
if(res.data.info_prefix) {
res.info = `${_.escape(res.data.info_prefix)} - ${res.info}`;
}
Notify.success(res.info);
Notify.success(_.unescape(res.info));
t.removeIcon(i);
data.connected = false;
data.icon = 'icon-database-not-connected';
@ -467,7 +467,7 @@ define('pgadmin.node.database', [
res.info = gettext('Database already connected.');
}
if(res.data.info_prefix) {
res.info = `${_.escape(res.data.info_prefix)} - ${res.info}`;
res.info = `${res.data.info_prefix} - ${res.info}`;
}
if(res.data.already_connected) {
Notify.info(res.info);

View File

@ -47,7 +47,7 @@ define(
text += '</div>';
Notify.alert(
title,
_.unescape(title),
text
)
.set({'closable': true,

View File

@ -862,7 +862,7 @@ define('pgadmin.browser.node', [
* Make sure - we're using the correct version of node
*/
obj = pgBrowser.Nodes[d._type];
var objName = d.label;
var objName = _.unescape(d.label);
var msg, title;

View File

@ -14,6 +14,7 @@ import Theme from 'sources/Theme';
import { NotifierMessage, MESSAGE_TYPE } from '../components/FormComponents';
import CustomPropTypes from '../custom_prop_types';
import gettext from 'sources/gettext';
import _ from 'lodash';
import pgWindow from 'sources/window';
import ModalProvider, { useModal } from './ModalProvider';
import { DefaultButton, PrimaryButton } from '../components/Buttons';

View File

@ -111,7 +111,7 @@ define('tools.querytool', [
this.set_server_version(opts.server_ver);
this.trigger('pgadmin-sqleditor:view:initialised');
this.connection_list = [
{'server_group': null,'server': null, 'database': null, 'user': null, 'role': null, 'conn_title': '&lt;' + gettext('New Connection') + '&gt;'},
{'server_group': null,'server': null, 'database': null, 'user': null, 'role': null, 'conn_title': '<' + gettext('New Connection') + '>'},
];
},
@ -185,9 +185,9 @@ define('tools.querytool', [
data_list.forEach((option, index) => {
var opt = '';
if ('is_selected' in option && option['is_selected']) {
opt = '<li class="connection-list-item selected-connection" data-index='+ index +'><a class="dropdown-item" href="#" tabindex="0">'+ option.conn_title +'</a></li>';
opt = '<li class="connection-list-item selected-connection" data-index='+ index +'><a class="dropdown-item" href="#" tabindex="0">'+ _.escape(option.conn_title) +'</a></li>';
} else {
opt = '<li class="connection-list-item" data-index='+ index +'><a class="dropdown-item" href="#" tabindex="0">'+ option.conn_title +'</a></li>';
opt = '<li class="connection-list-item" data-index='+ index +'><a class="dropdown-item" href="#" tabindex="0">'+ _.escape(option.conn_title) +'</a></li>';
}
$('#connections-list').append(opt);
});
@ -3848,7 +3848,7 @@ define('tools.querytool', [
var self = this;
var open_new_tab = self.browser_preferences.new_browser_tab_open;
if(open_new_tab && open_new_tab.includes('qt')) {
window.document.title = title;
window.document.title = _.escape(title);
} else {
_.each(pgWindow.default.pgAdmin.Browser.docker.findPanels('frm_datagrid'), function(p) {
if (p.isVisible()) {