Skip to main content.
home | support | download

Back to List Archive

Re: Ampersands are being converted

From: Bernhard Weisshuhn <bkw(at)>
Date: Tue Sep 21 2004 - 13:38:20 GMT
On Tue, Sep 21, 2004 at 05:58:37AM -0700, Terry Gliedt <> wrote:

> For many years I've always written URLs which invoke a script like this:
> 	http://foo/path?bar=1&foo=2

.. which is common, but invalid xml and therefore invalid xhtml.

> So when I saw that swish-e did
> 	/pubcgi/swish.cgi?query=peggy&amp;start=15
> I was surprised at &amp;.  I had expected to see & instead of &amp;. 
> The char entity isn't needed of course, since the href value is not 
> rendered visible in the page.

Doesn't matter. It is not valid anymore. And &amp; is backwards compatible.
Update your habits. Or use ';' if you use (pragma -newstyle_urls).

> Anyway, &amp; works in a URL to my surprise.


> >>The use= key/value is not being used with the other links, so swish 
> >>attempts to use the default database (which does not exist) and I get an 
> >>error for the query.
> > 
> > 
> > Still not sure what you mean.
> See the 'Next 15' link. It contains 'use=fusion', but the other links to 
> pages do not. So when I click on '2', the link fails because swish.cgi 
> is looking for the default datebase (default.index). But the script did 
> know enough to specify the use= keyword for 'Next 15'.
> What surprises me here is that this works for anyone. The swish.cgi I am 
> using is from the example directory in the source with conf changes 
> only, no code changes.

So where does that parameter 'use' come from in the first place?
What makes you think it should be preserved in all links?
I could not find it in swish.cgi. Maybe my fault, I havent used
swish.cgi in years.

Received on Tue Sep 21 06:38:57 2004