diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-01-22 17:37:41 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-01-22 17:37:41 +0000 |
commit | a1e4655bbcb7f6682689391975dfda5a60a304de (patch) | |
tree | cd630358bd68a4b5ac71ac4e4d63556f599a52ff /misc | |
parent | 14ae238973570697cd90c8c96a1fd89a7e4995f2 (diff) | |
download | brdo-a1e4655bbcb7f6682689391975dfda5a60a304de.tar.gz brdo-a1e4655bbcb7f6682689391975dfda5a60a304de.tar.bz2 |
- #44939: Fix Unicode autocomplete in IE
Diffstat (limited to 'misc')
-rw-r--r-- | misc/autocomplete.js | 3 | ||||
-rw-r--r-- | misc/drupal.js | 9 | ||||
-rw-r--r-- | misc/upload.js | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/misc/autocomplete.js b/misc/autocomplete.js index 6cb72518c..f680ef727 100644 --- a/misc/autocomplete.js +++ b/misc/autocomplete.js @@ -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); } diff --git a/misc/drupal.js b/misc/drupal.js index 7f3a44cea..b962c89f7 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -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; diff --git a/misc/upload.js b/misc/upload.js index 89f7cfb69..9945803f6 100644 --- a/misc/upload.js +++ b/misc/upload.js @@ -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); |