Prevent server_add autocomplete from being interpreted as UTF-7. Fixes #1871.

This commit is contained in:
Bharat Mediratta
2012-05-16 12:26:09 -07:00
parent 790f64cbcf
commit 88c0363344
2 changed files with 18 additions and 2 deletions

View File

@@ -9,6 +9,23 @@ $("document").ready(function() {
{
max: 256,
loadingClass: "g-loading-small",
parse: function(data) {
var parsed = [];
var rows = data.split("\n");
rows.shift(); // drop <META> tag
for (var i=0; i < rows.length; i++) {
var row = $.trim(rows[i]);
if (row) {
row = row.split("|");
parsed[parsed.length] = {
data: row,
value: row[0],
result: row[0]
};
}
}
return parsed;
}
});
});
</script>