RE: [PHP] Why is the default value for arg_separator.output ''?

2005-04-20 Thread David Dorward
Jared Williams wrote:

 Given this, why is the default value of arg_separator.output
 '' and not 'amp;'?

 URLs don't have amp; in them.

 The amp; is specific escaping for _only_ XML.

No, XML and SGML which includes XHTML and HTML. How often are PHP sessions
used to generate output for languages other then those? 

And even if you want to generate for other languages, why not set
arg_separator.output to ; instead? Its already in arg_separator.input and
doesn't need escaping to be represented in an HTML or XHTML document. The
HTML specification even goes so far as to explicitly recommend it.

-- 
David Dorward   http://blog.dorward.me.uk/   http://dorward.me.uk/
 Home is where the ~/.bashrc is

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



Re: [PHP] Why is the default value for arg_separator.output ''?

2005-04-20 Thread David Dorward
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 amp; has been a requirement of SGML and XML
based languages, HTML included, since long before XHTML appeared on the
scene.

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 amp; 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 amp; 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=baramp;baz=baa into the address bar is not how
the issue should be tested.

-- 
David Dorward   http://blog.dorward.me.uk/   http://dorward.me.uk/
 Home is where the ~/.bashrc is

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



Re: [PHP] Why is the default value for arg_separator.output ''?

2005-04-20 Thread Jochem Maas
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 amp; 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;)/,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 amp; 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 amp; 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=baramp;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


Re: [PHP] Why is the default value for arg_separator.output ''?

2005-04-20 Thread David Dorward
Jochem Maas wrote:

 Representing  characters as amp; has been a requirement of SGML and XML
 based languages

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

Not really, since my concern is with URLs modified by the session handling
code and that can be fixed by changing the arg_separator.output ini
directive.

I'm just trying to work out if the default value for that directive is 
(rather then amp; or ;) due to a bug or if there is a good reason for it.

-- 
David Dorward   http://blog.dorward.me.uk/   http://dorward.me.uk/
 Home is where the ~/.bashrc is

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



Re: [PHP] Why is the default value for arg_separator.output ''?

2005-04-19 Thread Tom Rogers
Hi,

Wednesday, April 20, 2005, 5:56:44 AM, you wrote:
DD For documents to conform to the XHTML recommendation, ampersand characters
DD much be encoded as amp;. The documentation for PHP recognises this. The
DD same applies to HTML (with some exceptions that the session code will never
DD encounter), although the PHP documentation makes no mention of this.

DD Given this, why is the default value of arg_separator.output '' and not
DD 'amp;'?

DD -- 
DD David Dorward   http://blog.dorward.me.uk/   http://dorward.me.uk/
DD  Home is where the ~/.bashrc is


You can set this with arg_separator.output  in php.ini

-- 
regards,
Tom

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



Re: [PHP] Why is the default value for arg_separator.output ''?

2005-04-19 Thread Roger B.A. Klorese
On Wed, 20 Apr 2005, Tom Rogers wrote:
 You can set this with arg_separator.output  in php.ini

That doesn't really answer why the choice was made to default to what 
not only shouldn't be the default, but should probably be illegal 
altogether.

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



RE: [PHP] Why is the default value for arg_separator.output ''?

2005-04-19 Thread Jared Williams
 
 For documents to conform to the XHTML recommendation, 
 ampersand characters much be encoded as amp;. The 
 documentation for PHP recognises this. The same applies to 
 HTML (with some exceptions that the session code will never 
 encounter), although the PHP documentation makes no mention of this.
 
 Given this, why is the default value of arg_separator.output 
 '' and not 'amp;'?

URLs don't have amp; in them.

The amp; is specific escaping for _only_ XML.

Jared

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



Re: [PHP] Why is the default value for arg_separator.output ''?

2005-04-19 Thread Richard Lynch

On Tue, April 19, 2005 4:05 pm, Roger B.A. Klorese said:
 On Wed, 20 Apr 2005, Tom Rogers wrote:
 You can set this with arg_separator.output  in php.ini

 That doesn't really answer why the choice was made to default to what
 not only shouldn't be the default, but should probably be illegal
 altogether.

E.

Some of us don't *USE* XHTML (blech!)

Why in the world should we be forced to follow your narrow-minded
so-called standard?  :-)

Furthermore, the  as separator pre-dates amp; by *years* and billions of
lines of code could be affected by altering the default.

So, really, Backwards Compatibility alone makes this a no-brainer default
value of:  

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Why is the default value for arg_separator.output ''?

2005-04-19 Thread Roger B.A. Klorese
Richard Lynch wrote:
Why in the world should we be forced to follow your narrow-minded
so-called standard?  :-)
 

Hint: smileys indicate that you're joking.  If you're joking, I don't 
get what's humorous -- please explain.  If you're making a serious point 
but trying to have the rhetorical equivalent of no offense, but... you 
should probably know that any time someone says no offense, but... 
they really mean to offend but get off scot-free.

Furthermore, the  as separator pre-dates amp; by *years* and billions of
lines of code could be affected by altering the default.
So, really, Backwards Compatibility alone makes this a no-brainer default
value of:  
So default behaviors should never change?!  Absurd.  you should be 
notified that they are changed, and should have a mechanism to configure 
for the previous behavior... but they have to be allowed to change as 
standards do.

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


Re: [PHP] Why is the default value for arg_separator.output ''?

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 7:45 pm, Roger B.A. Klorese said:
 Richard Lynch wrote:

Why in the world should we be forced to follow your narrow-minded
so-called standard?  :-)



 Hint: smileys indicate that you're joking.  If you're joking, I don't
 get what's humorous -- please explain.  If you're making a serious point
 but trying to have the rhetorical equivalent of no offense, but... you
 should probably know that any time someone says no offense, but...
 they really mean to offend but get off scot-free.

Okay, I meant to offend. :-)

Happy? :-) :-) :-)

Furthermore, the  as separator pre-dates amp; by *years* and billions
 of
lines of code could be affected by altering the default.
So, really, Backwards Compatibility alone makes this a no-brainer default
value of:  

 So default behaviors should never change?!  Absurd.  you should be
 notified that they are changed, and should have a mechanism to configure
 for the previous behavior... but they have to be allowed to change as
 standards do.

Please feel free to take this up with the Developers on PHP-Dev or
PHP-Internals or whatever and argue the issue with them.

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]

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

Good Luck!

-- 
Like Music?
http://l-i-e.com/artists.htm

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