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
This commit is contained in:
Vitaliy 2012-11-15 03:31:37 +02:00
parent 1500aba1c3
commit 41efeedc30

View File

@ -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 };