Re: Why is the default value for arg_separator.output '&'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Dorward wrote:
Richard Lynch wrote:


But if it's going to break a billion scripts, it's probably not gonna
happen to follow a "standard" that isn't the only game in town.  XHTML is
not ubiquitous. [shrug]


Representing & characters as & has been a requirement of SGML and XML
based languages, HTML included, since long before XHTML appeared on the
scene.

you might be able to put this func to use somewhere:

function properAmpersands($url)
{
    return preg_replace("/(&)(?!amp;)/","&",(string)$url);
}


What scripts would making this change be likely to break? I have difficulty believing it could cause problems for other then a very small proprotion of users - unlike the change in register_globals a few years ago.


Since there are still browsers in use that will choke on & in the URL,
last time I checked, you're pretty much fighting for a lost cause, as far
as I'm concerned.


We aren't talking about "in the URL", we're talking about "in the href
attribute". Browsers convert & in HTML documents (including in href
attributes) to & before they think about them being part of URLs.

Can you name any browser that gets it wrong? I stress that typing
http://www.example.com/?foo=bar&baz=baa into the address bar is not how
the issue should be tested.


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux