- #44939: Fix Unicode autocomplete in IE
parent
14ae238973
commit
a1e4655bbc
|
@ -222,7 +222,6 @@ jsAC.prototype.found = function (matches) {
|
|||
*/
|
||||
function ACDB(uri) {
|
||||
this.uri = uri;
|
||||
this.max = 15;
|
||||
this.delay = 300;
|
||||
this.cache = {};
|
||||
}
|
||||
|
@ -241,7 +240,7 @@ ACDB.prototype.search = function(searchString) {
|
|||
var db = this;
|
||||
this.timer = setTimeout(function() {
|
||||
addClass(db.owner.input, 'throbbing');
|
||||
HTTPGet(db.uri +'/'+ searchString +'/'+ db.max, db.receive, db);
|
||||
HTTPGet(db.uri +'/'+ encodeURIComponent(searchString), db.receive, db);
|
||||
}, this.delay);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ if (typeof XMLHttpRequest == 'undefined') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates an HTTP GET request and sends the response to the callback function
|
||||
* Creates an HTTP GET request and sends the response to the callback function.
|
||||
*
|
||||
* Note that dynamic arguments in the URI should be escaped with encodeURIComponent().
|
||||
*/
|
||||
function HTTPGet(uri, callbackFunction, callbackParameter) {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
|
@ -81,8 +83,9 @@ function HTTPPost(uri, callbackFunction, callbackParameter, object) {
|
|||
var toSend = '';
|
||||
if (typeof object == 'object') {
|
||||
xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
for (var i in object)
|
||||
toSend += (toSend ? '&' : '') + i + '=' + escape(object[i]);
|
||||
for (var i in object) {
|
||||
toSend += (toSend ? '&' : '') + i + '=' + encodeURIComponent(object[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
toSend = object;
|
||||
|
|
|
@ -39,7 +39,7 @@ jsUpload.prototype.onsubmit = function () {
|
|||
var hide = $(this.hide);
|
||||
// Insert progressbar and stretch to take the same space.
|
||||
this.progress = new progressBar('uploadprogress');
|
||||
this.progress.setProgress(-1, 'Uploading file...');
|
||||
this.progress.setProgress(-1, 'Uploading file');
|
||||
this.progress.element.style.width = '28em';
|
||||
this.progress.element.style.height = hide.offsetHeight +'px';
|
||||
hide.parentNode.insertBefore(this.progress.element, hide);
|
||||
|
|
Loading…
Reference in New Issue