Open
Bug 1321792
Opened 9 years ago
Updated 7 months ago
UTF-8 characters wrongly encoded as %u1234 in keyword search bookmark URL
Categories
(Firefox :: Bookmarks & History, defect, P3)
Tracking
()
NEW
People
(Reporter: Smylers, Unassigned)
References
()
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20161017194958
Steps to reproduce:
Create a keyword search bookmark with a UTF-8 character in the search URL:
1 Go to Oxford Dictionaries: https://en.oxforddictionaries.com/
2 Right click in the ‘Type a word or phrase’ search box near the top right, and choose ‘Add a Keyword for this Search...’.
3 Add the keyword ‘od’ (or a different one if you're already using that) and note where you're saving the bookmark.
4 Try to use the keyword, searching for any word, such as ‘od feckless’.
Actual results:
I ended up at this URL, which is a blank page: https://en.oxforddictionaries.com/search?utf8=%u2713&filter=dictionary&query=feckless
Expected results:
That should've been this URL, which redirects to the expected search results page:
https://en.oxforddictionaries.com/search?utf8=✓&filter=dictionary&query=feckless
Or it would've worked with the ‘✓’ symbol encoded as UTF-8 bytes:
https://en.oxforddictionaries.com/search?utf8=%E2%9C%93&filter=dictionary&query=feckless
Find the bookmark, choose ‘Properties’, and see that its location is:
https://en.oxforddictionaries.com/search?utf8=%u2713&filter=dictionary&query=%s
The ‘✓’ symbol is represented by %u2713, which differs from the original URL, and isn't recognized as intended by the server. Editing that to be either the literal character or the %-encoded UTF-8 bytes fixes it and makes the keyword search function.
Note that simply bookmarking a page with a ‘✓’ in it (not as a keyword search), stores the URL accurately. For instance bookmark this page (with Ctrl+D):
https://en.wikipedia.org/w/index.php?title=✓&action=history
and see that its location is stored as:
https://en.wikipedia.org/w/index.php?title=%E2%9C%93&action=history
Component: Untriaged → Bookmarks & History
Updated•9 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
This bug has caused problems for searching Swedish language wikis, such as Wikipedia.
Example URL: https://sv.wikipedia.org/w/index.php?search=test%20test&title=Special%3AS%F6k
They decode the URL with JavaScript, which doesn't work. This causes search tools not to display.
I've filed a bug on their end: https://phabricator.wikimedia.org/T210684
I've encountered this bug enough to finally come here to file a bug report. Seeing as one already exists but is inactive, this is my ping to hopefully draw some attention.
Here's another example of where bad encoding sadly breaks the excellent keyword search feature:
ಠ_ಠ : https://www.goodreads.com/search?utf8=%u2713&search_type=books&q=great%20book
(★‿★) : https://www.goodreads.com/search?utf8=✓&search_type=books&q=great%20book
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•