Permalink
Browse files

Update javascript/GridField.js

The escape and unescape functions do not work properly for non-ASCII characters and have been deprecated. In JavaScript 1.5 and later, use encodeURI, decodeURI, encodeURIComponent, and decodeURIComponent.
I have problem with cyrillic http://www.silverstripe.org/general-questions/show/21433
  • Loading branch information...
1 parent 1500aba commit 41efeedc305d9d79f6b00120e04bca160986b649 @webspilka webspilka committed Nov 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 javascript/GridField.js
View
2 javascript/GridField.js
@@ -302,7 +302,7 @@
},
type: "GET",
url: suggestionUrl,
- data: escape(searchField.attr('name'))+'='+escape(searchField.val()),
+ data: encodeURIComponent(searchField.attr('name'))+'='+encodeURIComponent(searchField.val()),
success: function(data) {
response( $.map(JSON.parse(data), function( name, id ) {
return { label: name, value: name, id: id };

0 comments on commit 41efeed

Please sign in to comment.