Skip to content

Commit 36966dc

Browse files
authored
Issue 53197: Field name with double byte character can cause client side exception in Firefox when trying to customize grid view (#6825)
- use encodeURI instead to account for child lookup nodes in tree - apply encodeURI in BaseTabs
1 parent 6b510bb commit 36966dc

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

core/webapp/internal/ViewDesigner/FieldMetaStore.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Ext4.define('LABKEY.internal.ViewDesigner.FieldMetaTreeStore', {
3737
type: 'json',
3838
root: 'columns',
3939
idProperty: function(json) {
40-
return json.fieldKeyPath.toUpperCase();
40+
return encodeURI(json.fieldKeyPath.toUpperCase()); // Issue 53197
4141
}
4242
}
4343
};
@@ -92,7 +92,7 @@ Ext4.define('LABKEY.internal.ViewDesigner.FieldMetaStore', {
9292
type: 'json',
9393
root: 'columns',
9494
idProperty: function(json) {
95-
return json.fieldKeyPath.toUpperCase();
95+
return encodeURI(json.fieldKeyPath.toUpperCase()); // Issue 53197
9696
}
9797
}
9898
};
@@ -109,7 +109,7 @@ Ext4.define('LABKEY.internal.ViewDesigner.FieldMetaStore', {
109109
getById : function(id) {
110110
var _id;
111111
if (Ext4.isString(id)) {
112-
_id = id.toUpperCase();
112+
_id = encodeURI(id.toUpperCase()); // Issue 53197
113113
}
114114
else {
115115
_id = id;

core/webapp/internal/ViewDesigner/tab/BaseTab.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Ext4.define('LABKEY.internal.ViewDesigner.model.FieldKey', {
1313
mapping: 'fieldKey',
1414
convert : function(fieldKey, rec) {
1515
if (Ext4.isString(fieldKey)) {
16-
return fieldKey.toUpperCase();
16+
return encodeURI(fieldKey.toUpperCase()); // Issue 53197
1717
}
1818

1919
if (rec && rec.raw && Ext4.isString(rec.raw.fieldKey)) {
20-
return rec.raw.fieldKey.toUpperCase();
20+
return encodeURI(rec.raw.fieldKey.toUpperCase()); // Issue 53197
2121
}
2222

2323
throw new Error('LABKEY.internal.ViewDesigner.model.FieldKey: unable to generate id due to missing fieldKey.');
@@ -30,7 +30,7 @@ Ext4.define('LABKEY.internal.ViewDesigner.model.FieldKey', {
3030
getById: function(id) {
3131
var _id;
3232
if (Ext4.isString(id)) {
33-
_id = id.toUpperCase();
33+
_id = encodeURI(id.toUpperCase()); // Issue 53197
3434
}
3535
else {
3636
_id = id;
@@ -51,7 +51,7 @@ Ext4.define('LABKEY.internal.ViewDesigner.store.FieldKey', {
5151
getById: function(id) {
5252
var _id;
5353
if (Ext4.isString(id)) {
54-
_id = id.toUpperCase();
54+
_id = encodeURI(id.toUpperCase()); // Issue 53197
5555
}
5656
else {
5757
_id = id;

0 commit comments

Comments
 (0)