Re: Some Early Topics
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Sun, 21 Feb 2010 03:33:43 +0100
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:How did you get the idea that invalid markup would be a de-facto
But if it is inline script, you need to escape the slash so the secondYeah, one of those things that standard and de-facto standard disagree
string value isn't mistaken for a closing H1 tag.
document.write("<h1>" + x +"<\/h1>");
The same way anything else would be considered a de-facto standard.
Then you are mistaken, because a de facto standard is something that is not
(yet) standardized, although regarded so common *and useful* that it is
widely accepted by the public, in particular by the professional community
that it concerns. ("De facto" being Latin for "concerning the fact" or "in
practice".) A synonym is "best current practice" (BCP).
But invalid markup does _not_ appear to be widely accepted, nor does it
appear to be considered best current practice. In fact, there is the
strong recommendation to use Valid markup even though there is built-in
error correction (because while that feature has some informal
recommendations regarding it, there are no must-haves, and therefore it
cannot be relied on).
Do we not see this confirmed every time someone reports problems with a Web
site using invalid markup, and is being told by several rather knowledgable
people to fix their markup first as the problem is likely going to go away
A million flies can't be wrong?
You have evaded that part of the question as well. A great number of
amateurs misusing the feature of built-in error correction, most of the
time without knowing it, does not make their doing any more a de facto
standard than any other of their mistakes.
I've tested the whole slew of browsers—ancient, mobile, desktop,You need to test more, and refine your tests. The issue is known to
etc.—and none would close the script tag on discovery of ETAGO.
occur with "<script ...>...</script>" in particular, but it has been
observed on other occasions as well.
<script>...</script> is exactly what I've been testing. What more is
there to test if the purpose was to check if SCRIPT content is parsed
The SCRIPT element with a `type' attribute, and perhaps "nested" SCRIPT
And which other occasions are you talking about? I haven't seen a client
that respects HTML 4.01 in this regard and closes SCRIPT element on
first occurrence of "</". Have you?
I am sure that the W3C Validator does, IOW not fixing this error makes
further validation of the document using this tool next to impossible.
I do not remember which browsers did this, but there must have been at
least one popular one among them or it would not have become such an issue
in the first place. Probably the list would include W3C Amaya. Lynx,
which is sometimes used by server administrators and as input for
screenreaders, is at least known to report invalid markup visibly (in the
status line), which would not look too good. Very likely further
information can be found in the archives in postings containing the term
"ETAGO" or "End Tag Open delimiter".
By the way, that reminds me of a similar misconception I had found on your
Web site that I did not find time to mail you about yet (so I am doing it
here and now, lest I forget again): You stated there something along the
lines that it would not matter that in XHTML the content of `script'
elements was not, where necessary, properly escaped or declared CDATA,
because the Content-Type `text/html' would not trigger an X(HT)ML parser
anyway. However, first of all you cannot know for sure which parser is
being used, and second it matters for the W3C Validator and any other
markup validator because they MUST NOT care for the Content-Type of the
markup resource with regard to syntax except for the `charset' parameter.
IOW, the markup is still _not_ Valid then. So by _not_ using Valid markup
there, you are shooting yourself in the foot there, too.
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7@xxxxxxxxxxxxxxxx> (2004)
- Re: Some Early Topics
- From: kangax
- Re: Some Early Topics
- Prev by Date: Re: How do I get keys from an associative array?
- Next by Date: get the global object in any environment
- Previous by thread: Re: Some Early Topics
- Next by thread: Re: Some Early Topics