diff --git a/docs/en_US/release_notes_4_16.rst b/docs/en_US/release_notes_4_16.rst index 7af69743d..aeaf1abc9 100644 --- a/docs/en_US/release_notes_4_16.rst +++ b/docs/en_US/release_notes_4_16.rst @@ -47,3 +47,4 @@ Bug fixes | `Issue #4965 `_ - Fix an issue where the Interval data type is not displayed in the properties dialog of table/column. | `Issue #4966 `_ - Fix 'Could not find the object on the server.' error while refreshing the check constraint. | `Issue #4978 `_ - Fix pgAdmin4 failed to start issue after upgrading to version 4.15. +| `Issue #4985 `_ - Fix an issue where the inherited table name with quotes did not escape correctly. diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js index b620ab73c..6c4e9ae69 100644 --- a/web/pgadmin/static/js/backform.pgadmin.js +++ b/web/pgadmin/static/js/backform.pgadmin.js @@ -2069,10 +2069,11 @@ define([ fromRaw: function(rawData) { return encodeURIComponent(rawData); }, - toRaw: function(formattedData) { + toRaw: function(formattedData, model, opts) { if (_.isArray(formattedData)) { - let tmpArr = _.map(formattedData, encodeURIComponent); - return _.map(tmpArr, decodeURIComponent); + if (opts && opts.tags) + return formattedData; + return _.map(formattedData, decodeURIComponent); } else { if (!_.isNull(formattedData) && !_.isUndefined(formattedData)) { return decodeURIComponent(formattedData); @@ -2279,10 +2280,8 @@ define([ return this; }, getValueFromDOM: function() { - var val = Backform.SelectControl.prototype.getValueFromDOM.apply( - this, arguments - ), - select2Opts = _.extend({}, this.field.get('select2') || this.defaults.select2); + var select2Opts = _.extend({}, this.field.get('select2') || this.defaults.select2), + val = this.formatter.toRaw(this.$sel.val(), this.model, select2Opts); if (select2Opts.multiple && val == null) { return [];