Closed
Bug 260006
Opened 20 years ago
Closed 19 years ago
keyword search doesn't work on specific site(POST method)
Categories
(Firefox :: Bookmarks & History, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 258223
People
(Reporter: sekundes, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10
This site only accept Big5 encoded string to be inputed. However, it does not
provide accept-charset="Big5" attribute in the <form> which in theory it should be.
Since the string of location bar inputed depends on the OS, so if my OS does not
use Big5 encoding as default, I could not get the search result by using the new
POST method supported keyword search.
In the past, I've managed to do a mozilla-compatible javascript keyword search
with the location by hardcoding accept-charset="Big5"...
javascript:function doForm(url,valary){ if(document.getElementById &&
document.createElement){ var form = document.createElement(%22form%22);
document.getElementsByTagName(%22body%22)[0].appendChild(form);
form.setAttribute(%22action%22, url); form.setAttribute(%22method%22,
%22POST%22); form.setAttribute(%22accept-charset%22, %22Big5%22); for(var i=0; i
< valary.length; i++){ var temp=document.createElement(%22input%22);
form.appendChild(temp); temp.setAttribute(%22type%22, %22hidden%22);
temp.setAttribute(%22name%22, valary[i][0]); temp.value = valary[i][1]; } }
form.submit(); } function doParse(url){ var pairs =
url.substring(url.indexOf('?')+1).split(%22&%22); url =
url.substring(0,url.indexOf('?')); var valary; for (var i=0;i<pairs.length;i++){
var pos = pairs[i].indexOf('='); if (pos >= 0){ var name =
pairs[i].substring(0,pos); var value = pairs[i].substring(pos+1); if(valary)
valary[valary.length]=[name, value]; else valary = [[name, value]]; } } return
doForm(url,valary); }
doParse(%22http://140.111.1.22/mandr/clc/dict/newsearch.cgi?Database=dict&GraphicWord=yes&QueryString=%s%22);
However, I hope the new keyoword search could concern encoding issue, otherwise
I've to use this long javascript keyword search for POST method site search
everytime...
Reproducible: Always
Steps to Reproduce:
1. go http://140.111.1.22/mandr/clc/dict/.
2. right click on <input> -> Add a keyword for this search...
3. Added a keyword bookmark.
4. Now use the keyword you assigned to search the string "中文".
5. The site got the string which is in wrong encoding.
Please be sure that you're viewing this page with UTF-8 encoding when you want
to copy the Chinese character "中文".
Thanks.
Assignee: vladimir → vladimir+bm
Comment 2•19 years ago
|
||
Fixed by bug 258223 - add &mozcharset=BIG5 to the bookmarked URL and the keyword
sends the proper encoding.
*** This bug has been marked as a duplicate of 258223 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Assignee: vladimir+bm → nobody
Comment 3•18 years ago
|
||
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs, filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•