Fix an issue where the inherited table name with quotes did not escape correctly. Fixes #4985.

This commit is contained in:
Akshay Joshi
2019-12-03 19:31:32 +05:30
parent 9110703aaa
commit f7cc79fab1
2 changed files with 7 additions and 7 deletions

View File

@@ -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 [];