Просмотр исходного кода

fixed TableAjax url encode for filter with %

Piotr Labudda 8 лет назад
Родитель
Сommit
9d069e372f
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      SE/se-lib/TableAjax.php

+ 3 - 3
SE/se-lib/TableAjax.php

@@ -3403,7 +3403,7 @@ var p5UI_TableAjax_generateFunctionNode = function(funObj, rowPK, props) {
 			if (Object.keys(_state.filters.filterCols).length > 0) {
 				$.each(_state.filters.filterCols, function(col, colProps) {
 					if (colProps.filter && colProps.filter.length > 0) {
-						urlAdd += '&f_' + col + '=' + colProps.filter;
+						urlAdd += '&f_' + col + '=' + encodeURIComponent(colProps.filter);
 					}
 				});
 				skipCols = true;
@@ -3412,13 +3412,13 @@ var p5UI_TableAjax_generateFunctionNode = function(funObj, rowPK, props) {
 			// specialFilters
 			$.each(_state.specialFilters, function(groupName, btnValue) {
 				if (btnValue.length > 0) {
-					urlAdd += '&sf_' + groupName + '=' + btnValue;
+					urlAdd += '&sf_' + groupName + '=' + encodeURIComponent(btnValue);
 				}
 			});
 
 			if (priv.options.forceFilterInit) {
 				$.map(priv.options.forceFilterInit, function(fltrProps, fltr) {
-					urlAdd += '&f_' + fltr + '=' + fltrProps;
+					urlAdd += '&f_' + fltr + '=' + encodeURIComponent(fltrProps);
 					filtersInitSet = true;
 				});
 			}