mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-04 00:02:03 +08:00
Issue 60: Contact search unicode problem
Contact search was not working for unicode letters. The CallbackServer was changed so that it returned url encode strings. On the JavaScript side the PhoneGap callback handler decodes the returned string.
This commit is contained in:
@@ -760,7 +760,8 @@ PhoneGap.JSCallback = function() {
|
||||
// If callback has JavaScript statement to execute
|
||||
if (xmlhttp.status === 200) {
|
||||
|
||||
var msg = xmlhttp.responseText;
|
||||
// Need to url decode the response and replace %20 with a space
|
||||
var msg = decodeURIComponent(xmlhttp.responseText.replace(/\+/g, '%20'));
|
||||
setTimeout(function() {
|
||||
try {
|
||||
var t = eval(msg);
|
||||
@@ -919,7 +920,6 @@ PhoneGap.includeJavascript = function(jsfile, successCallback) {
|
||||
id.appendChild(el);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* This class is provided to bridge the gap between the way plugins were setup in 0.9.3 and 0.9.4.
|
||||
* Users should be calling navigator.add.addService() instead of PluginManager.addService().
|
||||
@@ -931,4 +931,5 @@ var PluginManager = {
|
||||
navigator.app.addService(serviceType, className);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user