Re: header() behaviour

From: Date: Wed, 29 Oct 2003 00:09:13 +0000
Subject: Re: header() behaviour
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-5056@lists.php.net to get a copy of this message
Gareth Ardron wrote:
$var = "foo=1&bar=2";
To clarify: You should use $var = "foo=1&bar=2"; and then $var for header() but htmlspecialchar($var) for your href: - HTTP-Headers must not be html-encoded. - HTML-Attributes on the other hand have to be html-encoded. Even though most browsers work with hrefs without html-encoding and some browsers might understand & in HTTP-Headers this is not conforming to the standards. - Chris

« previous php.internals (#5056) next »