Open Bug 252209 Opened 20 years ago Updated 12 years ago

%s in keyword replacements encodes special characters as URL instead of as POST

Categories

(SeaMonkey :: Bookmarks & History, defect)

defect
Not set
minor

Tracking

(Not tracked)

People

(Reporter: dsmutil, Unassigned)

References

()

Details

(Whiteboard: [2012 Fall Equinox])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040708
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040708

When using a keyword bookmark, the search string is parsed and characters like
spaces are escaped. The method for doing this may not be compatible with the
usage. See examples below.

Perhaps two flags are needed: one for a query (A below) and one for extending a
url (B below).

Reproducible: Always
Steps to Reproduce:
A1. bookmark created: http://www.google.com/search?q=%s  (where keyword = ?)
A2. In the address bar, type: ? mozilla browser

B1. bookmark created: http://webserver.mydomain.tld/~%s (where keyword = homepg)
B2. In the address bar, type: homepg chuck jones
Actual Results:  
A. Went to: http://www.google.com/search?q=mozilla%20browser

B. Went to: http://webserver.mydomain.tld/~chuck%20jones

Expected Results:  
A. Should have gone to: http://www.google.com/search?q=mozilla+browser

B. (this is correct)


http://andrew.triumf.ca/cgi-bin/port?%s (keyword = port)
doesn't work, for example, when querying:  port udp 192

but querying: port udp+192
does work.
Depends on: 123006
I think what you're getting at is that keywords don't map to POST data, and that
they only work for URL/GET requests. Please confirm.
That's not quite it, but close. Form results are escaped one way while URLs are
escaped another. This is true for GET form submissions.

A form like:
<form method="get" action="http://google.com/search">
  <input name="q"/> <input type="submit"/>
</form>

Will escape the spaces with "+" just as a POST would.
Product: Browser → Seamonkey
Since the regression from bug 123006 is in bug 319169 and it's listed as a dependant, I'm adding that as well.
Depends on: 319169
OS: Windows 2000 → All
Hardware: PC → All
Reassigning as per Bug #32644
Assignee: p_ch → nobody
This bug propose to implement strange AI to guess when replace space with + sign on some sites, but how browser must distinguish where to use it, and where not?
On other hand, last example from Comment 0 is still broken, I can't queue udp+192 because + became encoded and site doesn't recognize request then.
Steps to reproduce:
1) Create bookmark http://andrew.triumf.ca/cgi-bin/port?%s with keyword = port
2) Try to use it in both port udp 192 and port udp+192 ways, neither one produce needed result, but if you put http://andrew.triumf.ca/cgi-bin/port?udp+192 into address line you get what you need
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/18.0 Firefox/18.0 SeaMonkey/2.15a1
Build identifier: 20120921003032
Whiteboard: [2012 Fall Equinox]
You need to log in before you can comment on or make changes to this bug.