mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow creation of objects in schemas with special chars in the name. Fixes #1598
This was caused through generation of SQL based on HTML-escaped labels, not the raw versions.
This commit is contained in:
parent
c044af9585
commit
fc5ce22de9
@ -73,7 +73,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
var schemaInfo = args.node_info.schema;
|
var schemaInfo = args.node_info.schema;
|
||||||
|
|
||||||
this.set({'owner': userInfo.name}, {silent: true});
|
this.set({'owner': userInfo.name}, {silent: true});
|
||||||
this.set({'schema': schemaInfo.label}, {silent: true});
|
this.set({'schema': schemaInfo._label}, {silent: true});
|
||||||
}
|
}
|
||||||
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
pgAdmin.Browser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
@ -492,7 +492,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
var isNew = (_.size(attrs) === 0);
|
var isNew = (_.size(attrs) === 0);
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
// Set Selected Schema
|
// Set Selected Schema
|
||||||
schema = args.node_info.schema.label
|
schema = args.node_info.schema._label
|
||||||
this.set({'basensp': schema}, {silent: true});
|
this.set({'basensp': schema}, {silent: true});
|
||||||
|
|
||||||
// Set Current User
|
// Set Current User
|
||||||
|
@ -114,7 +114,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
var schemaInfo = args.node_info.schema;
|
var schemaInfo = args.node_info.schema;
|
||||||
|
|
||||||
this.set({'seqowner': userInfo.name}, {silent: true});
|
this.set({'seqowner': userInfo.name}, {silent: true});
|
||||||
this.set({'schema': schemaInfo.label}, {silent: true});
|
this.set({'schema': schemaInfo._label}, {silent: true});
|
||||||
}
|
}
|
||||||
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);
|
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
@ -65,8 +65,8 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
var schemaInfo = args.node_info.schema;
|
var schemaInfo = args.node_info.schema;
|
||||||
this.set({
|
this.set({
|
||||||
'owner': userInfo.name,
|
'owner': userInfo.name,
|
||||||
'synobjschema': schemaInfo.label,
|
'synobjschema': schemaInfo._label,
|
||||||
'schema': schemaInfo.label,
|
'schema': schemaInfo._label,
|
||||||
'targettype': 'r'
|
'targettype': 'r'
|
||||||
}, {silent: true});
|
}, {silent: true});
|
||||||
} else {
|
} else {
|
||||||
|
@ -284,7 +284,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
var schemaInfo = args.node_info.schema;
|
var schemaInfo = args.node_info.schema;
|
||||||
|
|
||||||
this.set({'relowner': userInfo.name}, {silent: true});
|
this.set({'relowner': userInfo.name}, {silent: true});
|
||||||
this.set({'schema': schemaInfo.label}, {silent: true});
|
this.set({'schema': schemaInfo._label}, {silent: true});
|
||||||
}
|
}
|
||||||
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);
|
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Backgrid) {
|
|||||||
var schemaInfo = args.node_info.schema;
|
var schemaInfo = args.node_info.schema;
|
||||||
|
|
||||||
this.set({'typeowner': userInfo.name}, {silent: true});
|
this.set({'typeowner': userInfo.name}, {silent: true});
|
||||||
this.set({'schema': schemaInfo.label}, {silent: true});
|
this.set({'schema': schemaInfo._label}, {silent: true});
|
||||||
}
|
}
|
||||||
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);
|
pgBrowser.Node.Model.prototype.initialize.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
@ -118,7 +118,7 @@ function($, _, S, pgAdmin, alertify, pgBrowser, CodeMirror) {
|
|||||||
var isNew = (_.size(attrs) === 0);
|
var isNew = (_.size(attrs) === 0);
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
// Set Selected Schema
|
// Set Selected Schema
|
||||||
var schemaLabel = args.node_info.schema.label;
|
var schemaLabel = args.node_info.schema._label;
|
||||||
if (schemaLabel == '') {
|
if (schemaLabel == '') {
|
||||||
this.set({'schema': 'public'}, {silent: true});
|
this.set({'schema': 'public'}, {silent: true});
|
||||||
} else {
|
} else {
|
||||||
|
@ -92,7 +92,7 @@ function($, _, S, pgAdmin, pgBrowser, CodeMirror) {
|
|||||||
var isNew = (_.size(attrs) === 0);
|
var isNew = (_.size(attrs) === 0);
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
// Set Selected Schema
|
// Set Selected Schema
|
||||||
var schemaLabel = args.node_info.schema.label;
|
var schemaLabel = args.node_info.schema._label;
|
||||||
if (schemaLabel == '') {
|
if (schemaLabel == '') {
|
||||||
this.set({'schema': 'public'}, {silent: true});
|
this.set({'schema': 'public'}, {silent: true});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user