Subject: Re: [htdig] Wrappers and htdig 1.3.5
From: Gilles Detillieux (firstname.lastname@example.org)
Date: Mon Apr 24 2000 - 08:34:51 PDT
According to Brandon Bell:
> I think the only solution is to hack the htdig code as you suggest below and
> revert the separator back to the '&'.
> If I use CGI.pm Version 2.64, which apparently does allow for the semicolon
> separator, I still have the problem that when HTML forms are submitted the
> ampersand is used, but when next/prev page clicks are done from the search
> results page the semicolon is used. Because of this inconsistency, writing
> any wrapper seems next to impossible to handle both cases at the same time.
It's unfortunate that the CGI standard and the HTML 4.0 standard are
at odds with each other on this, but that's life. The solution is
really simple. Any CGI parameter parsing should recognise both the
ampersand (&) and semicolon (;) as parameter separators, and both of
these characters within a CGI parameter value should be hex-encoded.
That's what htsearch does, and if CGI.pm 2.64 is properly written,
that's what it should do as well.
The CGI specification has not changed, so the ampersand separator is still
valid in a query string from a CGI form, whether the GET or POST method
is used. It's just in the context of a query string embedded in an URL,
e.g. in an <a href=...> tag, that the HTML 4.0 specification recommends
using a semicolon instead of an ampersand. The Display::createURL()
method in htsearch does just that, for the page buttons. When you hit
the submit button (i.e. Search button) on the search form, the browser
will still build up the query string with ampersand separators, just as
before, and htsearch will still correctly handle that.
-- Gilles R. Detillieux E-mail: <email@example.com> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
------------------------------------ To unsubscribe from the htdig mailing list, send a message to firstname.lastname@example.org You will receive a message to confirm this.
This archive was generated by hypermail 2b28 : Mon Apr 24 2000 - 06:21:09 PDT