Skip to content

Commit

Permalink
Merge pull request #263 from gyselroth/v3.2.x
Browse files Browse the repository at this point in the history
v3.2.7
  • Loading branch information
raffis authored Sep 11, 2019
2 parents ad359f6 + e4cace7 commit d677c03
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 3.2.7
**Maintainer**: balloon-team <[email protected]>\
**Date**: Wed Sep 11 16:31:23 CEST 2019

* [FIX] fallback locale does not work #261
* [FIX] json query for users/groups is not properly escaped #260


## 3.2.6
**Maintainer**: balloon-team <[email protected]>\
**Date**: Thu Jul 11 12:29:23 CEST 2019
Expand Down
16 changes: 8 additions & 8 deletions src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2998,7 +2998,7 @@ var balloon = {
* @return void
*/
_eventsWindowSearch: function(node) {
var value = $(this).val();
var value = encodeURIComponent($(this).val());

var $fs_event_list = $('#fs-event-window #fs-events-window-list'),
$fs_event_list_ul = $fs_event_list.find('ul');
Expand Down Expand Up @@ -5566,12 +5566,12 @@ var balloon = {
return;
}

var value = $share_consumer_search.data("kendoAutoComplete").value()
var value = encodeURIComponent($share_consumer_search.data("kendoAutoComplete").value());
if(value === '' || value === undefined) {
return;
}

var filter = JSON.stringify({'query': {'name': $share_consumer_search.data("kendoAutoComplete").value()}});
var filter = JSON.stringify({'query': {'name': value}});

balloon.xmlHttpRequest({
url: balloon.base+'/groups?'+filter,
Expand All @@ -5592,7 +5592,7 @@ var balloon = {
}
});

filter = JSON.stringify({'query': {'username': $share_consumer_search.data("kendoAutoComplete").value()}});
filter = JSON.stringify({'query': {'username': value}});

balloon.xmlHttpRequest({
url: balloon.base+'/users?'+filter,
Expand Down Expand Up @@ -5751,7 +5751,7 @@ var balloon = {
serverFiltering: true,
transport: {
read: function(operation) {
var value = $input.data("kendoAutoComplete").value()
var value = encodeURIComponent($input.data("kendoAutoComplete").value());
if(value === '' || value === undefined) {
operation.success([]);
$input.data('kendoAutoComplete').close();
Expand All @@ -5764,7 +5764,7 @@ var balloon = {
var filter = {
'query': {
'name': {
"$regex": $input.data("kendoAutoComplete").value(),
"$regex": value,
"$options": "i"
},
}
Expand Down Expand Up @@ -5800,7 +5800,7 @@ var balloon = {
var filter = {
'query': {
'username': {
"$regex": $input.data("kendoAutoComplete").value(),
"$regex": value,
"$options": "i"
},
}
Expand Down Expand Up @@ -6893,7 +6893,7 @@ var balloon = {
$('#fs-search').removeClass('fs-search-filtered');
}

var query = balloon.buildQuery(content, filters);
var query = balloon.buildQuery(encodeURIComponent(content), filters);

if(query === undefined) {
return false
Expand Down
6 changes: 4 additions & 2 deletions src/lib/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const kendoCultures = {
'en-GB': require('kendo-ui-core/js/cultures/kendo.culture.en-GB.js'),
'en-AU': require('kendo-ui-core/js/cultures/kendo.culture.en-AU.js'),
'en-US': require('kendo-ui-core/js/cultures/kendo.culture.en-US.js'),
}
};

const defaultLang = 'en';

var translate = {
config: {},
Expand Down Expand Up @@ -100,7 +102,7 @@ var translate = {
prefix: 'i18next_res_',
expirationTime: 60*60*120
},
fallbackLng: translate.config.defaultLang,
fallbackLng: translate.config.defaultLang || defaultLang,
backend: {
ajax: translate.load,
loadPath: function(lng,ns){
Expand Down

0 comments on commit d677c03

Please sign in to comment.