Re: mod_perl guide corrections: in uris

2001-02-11 Thread Robin Berjon

At 02:54 12/02/2001 +0100, Marc Lehmann wrote:
Stas told me to forward my mail to the list, since there was a large
discussion about it. Since I now see that this seems to have been a kind
of dispute and not an ommision I'll provide references to the standards
below.

- Forwarded message from Marc Lehmann [EMAIL PROTECTED] -

in http://perl.apache.org/guide/browserbugs.html I read:

   Preventing QUERY_STRING from getting corrupted because of entity key
   names:

   http://my.site.com/foo.pl?foo=barreg=foobar, then some browsers will
   interpret reg as an SGML entity

This claims this is a browser bug, which it isn't. Browsers are perfectly
fine to interpret the reg as an entity when you embed this in the
html source unquoted.

I don't think so. The browser would be right to treat reg; as an entity,
not reg. If it had proper heuristics for dealing with poor HTML, it'd
detect that there is no ; in sight for the next n chars, or that reg= isn't
the start of an entity it knows about, and it would treat the  as a literal.

However, I agree that people should try their best to write proper html. If
the above url appeared in a link it should be encoded as
http://my.site.com/foo.pl?foo=baramp;reg=foobar. I find that a lot of
developers don't care the least about the html they output because they
somehow despise it. Think twice: take out the html, what's left of your
site ? XHTML clearly forbids such wrong constructs (won't even parse if you
get it wrong) and that's cool. It's like use strict for HTML.

-- robin b.
In which level of metalanguage are you now speaking?




Re: mod_perl guide corrections: in uris

2001-02-11 Thread Marc Lehmann

On Mon, Feb 12, 2001 at 03:13:55AM +0100, Robin Berjon [EMAIL PROTECTED] wrote:
 I don't think so. The browser would be right to treat reg; as an entity,
 not reg.

But why? It's not HTML in the first place, so expecting from clients to
interpret it in one way or another is not sensible.

 If it had proper heuristics for dealing with poor HTML, it'd
 detect that there is no ; in sight for the next n chars, or that reg= isn't

While one might rgue that clients should apply heuristics, given the large
amount of borken html out there, one has to remember that the source for
this broken html WAS sloppy html parsers with heuristics. If netscape and
mosaic had flagged syntax errors nobody would expect browsers to implement
heuristics today :(

 However, I agree that people should try their best to write proper html. If

Especially since you can only choose between theoretically incorerct and
in practise sometimes not working AND theoretically correct and working
alway sin practise I think the choise should be clear ;)

 somehow despise it. Think twice: take out the html, what's left of your
 site ? XHTML clearly forbids such wrong constructs (won't even parse if you
 get it wrong) and that's cool. It's like use strict for HTML.

Which is exactly my point ;) Implying this is a browser bug will only make
more people insist on outputting "correct" code. After all, the clients
must be fixed ;-

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED]  |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |



Re: mod_perl guide corrections: in uris

2001-02-11 Thread Robin Berjon

At 03:26 12/02/2001 +0100, Marc Lehmann wrote:
On Mon, Feb 12, 2001 at 03:13:55AM +0100, Robin Berjon [EMAIL PROTECTED] 
wrote:
 I don't think so. The browser would be right to treat reg; as an entity,
 not reg.

But why? It's not HTML in the first place, so expecting from clients to
interpret it in one way or another is not sensible.

Either a client has heuristics to deal with broken stuff or it hasn't. If
it does, I'd expect it to go the whole way on a simplistic case as the one
above.

 If it had proper heuristics for dealing with poor HTML, it'd
 detect that there is no ; in sight for the next n chars, or that reg= isn't

While one might rgue that clients should apply heuristics, given the large
amount of borken html out there, one has to remember that the source for
this broken html WAS sloppy html parsers with heuristics. If netscape and
mosaic had flagged syntax errors nobody would expect browsers to implement
heuristics today :(

It's a chicken and egg problem. See how Netscape 6 / Mozilla is being
bashed by designers out there. They all think it's a broken browser because
it won't take their broken HTML. It tries hard (if you don't put a doctype,
or put an old one) to emulate Netscape 4 brokenness, but it can't go all
the way. As a result all those people are not using it, and are telling
everyone not to use it. When you think that most of the time those people
are considered "experts" in HTML/the web by others around them you can tell
that a browser won't get accepted if those braindead pseudo-experts aren't
happy with it.

The only way out is careful education, and that's going to take time.

 However, I agree that people should try their best to write proper html. If

Especially since you can only choose between theoretically incorerct and
in practise sometimes not working AND theoretically correct and working
alway sin practise I think the choise should be clear ;)

True. It's really easy to produce html that does whatever you want and is
correct. And is accessible. The main argument I use when convincing people
(and I have to do that a lot) is forward compatibility. If it's correct now
it'll always be. Today's heuristics may disappear with the next browser
version.

 somehow despise it. Think twice: take out the html, what's left of your
 site ? XHTML clearly forbids such wrong constructs (won't even parse if you
 get it wrong) and that's cool. It's like use strict for HTML.

Which is exactly my point ;) Implying this is a browser bug will only make
more people insist on outputting "correct" code. After all, the clients
must be fixed ;-

We are in agreement :-) That isn't a browser bug and should be removed from
the list.

-- robin b.
"Windows may be pretty. And easy. But it has no depth or soul. It's like
the one-night stand of operating systems. You feel cheap after using it."
-- Steph, in User Friendly