Page MenuHomePhabricator

[DO NOT USE] HTML validity (tracking)
Closed, ResolvedPublic

Description

This task is archived, see reasons at T102492.

This is a tracking bug for problems with HTML output compliance and compatibility.


See Also:

Details

Reference
bz209

Related Objects

StatusAssignedTask
OpenNone
ResolvedNone
ResolvedNone
Resolved TrevorParscal
ResolvedNone
ResolvedNone
Resolvedbrion
ResolvedNone
ResolvedNone
ResolvedNone
DeclinedNone
ResolvedNone
ResolvedNone
DeclinedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
DeclinedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
OpenNone
DeclinedNone
DeclinedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
InvalidNone
InvalidNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolved TrevorParscal
ResolvedNone
ResolvedNone
DeclinedNone
ResolvedNone
Resolvedtstarling
ResolvedNone
OpenNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
DeclinedNone
ResolvedNone
ResolvedNone
ResolvedNone
Duplicate TrevorParscal
ResolvedNone
OpenNone
StalledNone
OpenNone
OpenNone
Duplicate TrevorParscal
ResolvedIzno
InvalidNone
ResolvedTheDJ
ResolvedNone
ResolvedIoannisKydonis
DeclinedNone
DeclinedNone
ResolvedPhysikerwelt
ResolvedJdforrester-WMF
ResolvedNone
ResolvedPhoenix303
OpenIoannisKydonis
ResolvedTpt
ResolvedKrinkle
Resolvedferveo
DeclinedKrinkle
OpenNone
ResolvedNone
ResolvedPaladox
ResolvedPhysikerwelt
DuplicateNone
ResolvedFomafix
ResolvedNone
OpenNone
ResolvedEBernhardson
OpenNone
DuplicateNone
ResolvedCatrope
Resolvedcscott
ResolvedFomafix
ResolvedFomafix
ResolvedSamtar
ResolvedEugene233
OpenNone
Resolveddivadsn

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

bim2007 wrote:

Given that the existing pages are flagrantly and commonly not well-formed XML,
wouldn't it be better to mark them with an HTML 4.01 doctype? The XHTML DTD is
an invitation to parse with an XML parser, and they can't be parsed that way.
Either a document is well-formed XML or it is not. Unterminated &ltbr&gt tags
are not a subtle point of interpretation.

brion added a comment.May 11 2007, 5:52 PM

We do produce well-formed XHTML except in the presence of bugs.

Adding 'tracking' keyword.

renich wrote:

Hello,

We, at LinuxCabal, think that this is a severe bug. We should set an example and follow these international standards.

If the header says XHTML 1.0 Strict, we should conform to just that.

http://validator.w3.org/check?uri=http://wiki.cabal.mx/wiki/P%25C3%25A1gina_Principal&charset=(detect+automatically)&doctype=Inline&group=0

http://wiki.cabal.mx/ <- MediaWiki 1.16.0 almost vanilla install (one extension for https logins)

(In reply to comment #7)

Hello,

We, at LinuxCabal, think that this is a severe bug. We should set an example
and follow these international standards.

It looks like a configuration issue at your end. Set $wgHtml5 to false. Then you should get valid transitional xhtml. I don't know where you get the strict header from.

ayg wrote:

1.16.0 ships with an XHTML Strict header for XML well-formedness reasons. Try setting the validator manually to HTML5 and it will validate (modulo bugs):

http://validator.w3.org/check?uri=http%3A%2F%2Fwiki.cabal.mx%2Fwiki%2FP%25C3%25A1gina_Principal&charset=%28detect+automatically%29&doctype=HTML5&group=0&user-agent=W3C_Validator%2F1.1

In 1.17, we switched to <!DOCTYPE html> after some fixes to ensure this doesn't break well-formedness (basically, getting rid of named entities). In 1.16, you can either set $wgWellFormedXml = false (disabling well-formedness) or $wgHtml5 = false (disabling HTML5 features) to get the doctype to match the content. In the default setup, output is valid HTML5 (modulo bugs) but has a misleading doctype.

Basically, there is an issue here, but it's fixed in 1.17, so there's nothing specific for us to do at this point. The patch to remove named entities was enormous and will not be backported to 1.16. In the future, you should file new bugs on specific issues you have, not post in existing bugs -- particularly not tracker bugs.

ayg wrote:

To reiterate, 1.16.0 does *not* violate any standards here. HTML5 permits the use of an XHTML 1.0 Strict header for HTML5 content, and so 1.16.0 is obeying HTML5 (modulo bugs). The validator is reporting that the page is not valid XHTML 1.0 Strict, which is true, but it *is* valid HTML5 -- as the link I gave above demonstrates.

renich wrote:

(In reply to comment #8)

It looks like a configuration issue at your end. Set $wgHtml5 to false. Then
you should get valid transitional xhtml. I don't know where you get the strict
header from.

I did just this and still not valid:
http://validator.w3.org/check?uri=http://wiki.cabal.mx/wiki/P%25C3%25A1gina_Principal&charset=(detect+automatically)&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator/1.1

Thank you for a quick reply, btw ;)

renich wrote:

(In reply to comment #9)

1.16.0 ships with an XHTML Strict header for XML well-formedness reasons. Try
setting the validator manually to HTML5 and it will validate (modulo bugs):

http://validator.w3.org/check?uri=http%3A%2F%2Fwiki.cabal.mx%2Fwiki%2FP%25C3%25A1gina_Principal&charset=%28detect+automatically%29&doctype=HTML5&group=0&user-agent=W3C_Validator%2F1.1

It appeared so (before the wgHtml5 = false) but, this warning seems to negate what the validator asserts. I found the warning just bellow.

"DOCTYPE Override in effect!

The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">" has been suppressed and the DOCTYPE for "HTML5" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.."

It seems the validator contradicts himself but, still, there's a warning; there shouldn't be one.

In 1.17, we switched to <!DOCTYPE html> after some fixes to ensure this doesn't
break well-formedness (basically, getting rid of named entities). In 1.16, you
can either set $wgWellFormedXml = false (disabling well-formedness) or $wgHtml5
= false (disabling HTML5 features) to get the doctype to match the content. In
the default setup, output is valid HTML5 (modulo bugs) but has a misleading
doctype.

Basically, there is an issue here, but it's fixed in 1.17, so there's nothing
specific for us to do at this point. The patch to remove named entities was
enormous and will not be backported to 1.16. In the future, you should file
new bugs on specific issues you have, not post in existing bugs -- particularly
not tracker bugs.

Nice to read. When is 1.17.0 out? ;)

ayg wrote:

(In reply to comment #12)

It appeared so (before the wgHtml5 = false) but, this warning seems to negate
what the validator asserts. I found the warning just bellow.

"DOCTYPE Override in effect!

The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0
Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">" has been
suppressed and the DOCTYPE for "HTML5" inserted instead, but even if no errors
are shown below the document will not be Valid until you update it to reflect
this new DOCTYPE.."

That's wrong. That text is correct for legacy HTML versions, which permit only one doctype, but HTML5 permits several different doctypes. Probably that validator text was written before HTML5 and never updated.

It seems the validator contradicts himself but, still, there's a warning; there
shouldn't be one.

The warning is gone in 1.17, but it's only a warning, not an error. It serves to alert you to a possible problem, not to say that there definitely is one.

Nice to read. When is 1.17.0 out? ;)

No planned release date.

using 1.17, I got only the following from the validator:

Warning Line 27, Column 77: The language attribute on the script element is obsolete. You can safely omit it.

<div id="siteNotice"><script type="text/javascript" language="JavaScript">

ayg wrote:

(In reply to comment #14)

using 1.17, I got only the following from the validator:

Warning Line 27, Column 77: The language attribute on the script element is
obsolete. You can safely omit it.

<div id="siteNotice"><script type="text/javascript" language="JavaScript">

Should be fixed in r77619. It's a problem with DismissableSiteNotice, not MediaWiki itself. (But you aren't supposed to mention bugs in tracking bugs, you're supposed to file a new bug and mark it blocking this.)

Should this issue be closed, as from now on, we're aiming to be HTML5-ish compliant?

We are currently supporting both and the html generation APIs are nicely abstracting the details away.

Now that we don't support XHTML 1.0 and many of the dependent bugs aren't really XHTML issues I'm making this our HTML validity tracking bug. bug 49337 will also cover things that affect our well formed XML feature.

Perhelion changed the status of subtask T40487: Remove button for <big> from toolbar from Open to Stalled.Mar 30 2017, 9:11 AM
Liuxinyu970226 renamed this task from HTML validity (tracking) to [DO NOT USE] HTML validity (tracking).May 6 2018, 11:03 AM
Liuxinyu970226 updated the task description. (Show Details)
Liuxinyu970226 updated the task description. (Show Details)