Closed
Bug 581933
Opened 14 years ago
Closed 14 years ago
Username autocomplete doesn't work outside ASCII
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.0
People
(Reporter: Wurblzap, Assigned: mkanat)
References
Details
Attachments
(1 file)
834 bytes,
patch
|
Wurblzap
:
review+
|
Details | Diff | Splinter Review |
If I enter a string containing non-ASCII characters in a autocomplete-enabled user field, no autocomplete search results are being shown even if what I entered is a substring of some account's real name. Search: grmblfrx Result: Gisudf Masägrmblfrxwerz <srtfuiawe@...> Search: ägrmblfrx Result: -none- Can be reproduced on landfill.
Assignee | ||
Comment 1•14 years ago
|
||
For now, this is blocking 4.0, so that we can investigate it. However, I have a suspicion that this may be due to the UTF-8 behavior of JSON-RPC. If it is, it will probably be pretty tricky to fix. But it may still be fixable. If it isn't fixable for 4.0, then moving to RPC::Any will fix it, because I know that RPC::Any has working Unicode behavior.
Flags: blocking4.0+
Assignee | ||
Comment 2•14 years ago
|
||
Okay, I've confirmed this on the bugzilla-tip installation, and will be investigating the cause.
Assignee | ||
Comment 3•14 years ago
|
||
Okay, the problem is in our JavaScript. We're getting enteredText as a URL-escaped value, and when we do unescape on it, it becomes latin1 instead of UTF-8. We need to find out how to get the data out of the field without it becoming pre-escaped.
Assignee | ||
Comment 4•14 years ago
|
||
Turns out that the fix is really easy! We just have to use decodeURIComponent instead of unescape. For more info about the difference, see: http://xkr.us/articles/javascript/encode-compare/ Also, that other line of code didn't need the unescape--it wasn't getting URI-escaped data.
Assignee: create-and-change → mkanat
Status: NEW → ASSIGNED
Attachment #485454 -
Flags: review?(wurblzap)
Reporter | ||
Comment 5•14 years ago
|
||
Comment on attachment 485454 [details] [diff] [review] v1 Thanks, works as advertised :)
Attachment #485454 -
Flags: review?(wurblzap) → review+
Updated•14 years ago
|
Assignee | ||
Comment 6•14 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified js/field.js Committed revision 7576. Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/ modified js/field.js Committed revision 7462
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•