Skip to content

Commit

Permalink
Update javascript/GridField.js
Browse files Browse the repository at this point in the history
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
webspilka committed Nov 15, 2012
1 parent 1500aba commit 41efeed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/GridField.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
}, },
type: "GET", type: "GET",
url: suggestionUrl, url: suggestionUrl,
data: escape(searchField.attr('name'))+'='+escape(searchField.val()), data: encodeURIComponent(searchField.attr('name'))+'='+encodeURIComponent(searchField.val()),
success: function(data) { success: function(data) {
response( $.map(JSON.parse(data), function( name, id ) { response( $.map(JSON.parse(data), function( name, id ) {
return { label: name, value: name, id: id }; return { label: name, value: name, id: id };
Expand Down

0 comments on commit 41efeed

Please sign in to comment.