https://bugzilla.wikimedia.org/show_bug.cgi?id=40329

--- Comment #25 from Daniel Friesen <[email protected]> 
2012-09-27 21:26:03 UTC ---
(In reply to comment #24)
> I have no idea who Strawman is.

Not who, what. It's a type of logical fallacy.
Here's a pretty good description of it:
http://yourlogicalfallacyis.com/strawman

> You say the align attributes need to be removed from the HTML output. I don't
> see why this needs to be done *now*. Because of a future spec that is not even
> finished and that no browser in the world is currently able to fulfill? I say
> the attributes don't need to be removed. They work everywhere. They will work
> everywhere for the next 10 years or more. I say it's stupid to "fix" something
> that is *not* broken. Especially if the *only* thing this "fix" does is to
> actually *break* something.
> 
> Basically you say there is no other way than to stick to a unfinished spec no
> matter if it makes sense or not.

I think I'll make this a bullet-pointed list:
- HTML5 (or as WHATWG calls it "HTML") is a living standard. Completion of the
standard is irrelevant. Individual components of the spec are separate. Some
components are new and in flux, while others are stable and finished
standardization. Removal of presentational attributes is one of those. align is
no longer a standard attribute, that is finished standardization.
- The facts people used to misrepresent to say that HTML5 isn't ready are also
not valid anymore:
http://wiki.whatwg.org/wiki/FAQ#What.27s_this_I_hear_about_2022.3F
- Additionally align="" has been deprecated since HTML 4.0. Even if you ignore
current standards and try to use the previous obsolete standards these still
aren't attributes we're supposed to be outputting from our software.
- We use HTML5. This whole discussion about whether HTML5 is finished or not is
pointless. HTML5 is the standard we are using RIGHT NOW to output MediaWiki
markup. Whether something is valid or invalid in a spec we are not using is
irrelevant.

> Like it's a law and not a recommendation.
> 
> I'm not a lawyer. I'm a coder.
> 
> You say you need to remove "invalid" attributes from the output. But at the
> same time you are accepting the *same* invalid attributes as input? This is
> confusing. When I use an align attribute in my code I expect it to work
> according to the spec. Like it did for many years. Now you introduced your own
> spec where it started to *not* work in some cases. This is confusing as hell.
> Till last week it was *my* decision what my code did. Now *you* decide that 
> the
> same code is invalid in some cases but still valid in other cases.

WikiText is not HTML, that's a simple fact you'll have to understand. HTML is
consumed by browsers and it's format is defined by the HTML standard. While
WikiText is consumed (and written) by the MediaWiki parser and human users who
do not follow standards. For a user trying to insert a centered table in the
middle of the page {| align=center makes perfect sense to create a centered
table even though is the wrong way to do it in HTML (which they probably won't
know). So it makes perfect sense to take that as an indication to create a
centered table. Which in CSS means to apply style="margin-left: 0;
margin-right: 0;" as we do now.

> You *dropped* a feature. Why? Where is the documentation for this?
> Where was the "consider changing your templates" warning a year ago?
> Where is the discussion were the community decided to removed this part of 
> the WikiText feature set?

As with everything we change 1.19's RELEASE-NOTES included the introduction of
presentational attribute sanitization.
At the time of introduction neither the <table> nor nested block quirks were
known so there was no need for any mass notification about incompatibilities
since it was supposed to be compatible.
The table float bug was caused by the relevant info being buried in a separate
section of the spec. After the table float bug was discovered someone tried
fixing it. Which caused bug 40306 since the committer made a mistake and made
that special case apply to more than the one tag it applies to. Then recently
that bug got fixed and deployed. Now the one single remaining issue is the
nested block align quirk.
;) Btw, here's a fun fact. HTML4 does not even appear to specify that
behaviour. In fact it has examples using text-align as a replacement for align.

It's been discussed on the mailing list multiple times. But we don't go asking
for community approval for each and every single change we make for the
software. It's ridiculously unscalable. Nothing would get done.

> Why only this part? Why not simply remove all of the invalid stuff? Why not 
> the
> <center> garbage? This would be way less confusing. A lot of stuff will break
> but everybody would *know* why. Even people that were not involved in the
> discussion.

Right now the Sanitizer only supports attribute sanitization. We don't have a
way to sanitize whole elements yet. To do that we need to add a new sanitizer
api for whole elements, deprecate the old one, and make some (potentially
non-trivial) changes to the WikiText parser. So we started with sanitization of
what we can do.
So basically sanitization of the rest of the stuff that was removed from HTML
will happen when someone gets around to it. I added bug 40579 so you can watch
that if you want to know when that gets fixed.

> And you *need* to remove all invalid stuff some day. When will this happen? In
> 10 years? The same time when the browsers will stop to read the align
> attributes? If this is true why not simply let the browsers decide if they are
> fine with an align attribute or not?

Someone should get around to cleaning up the rest of the invalid stuff within a
few releases. It's probably not going to take even 2 years, much less 10.

> Why do you think it's your responsibility
> to make this decision? It wasn't your responsibility till last week. All you
> did was whitelisting. The align attributes were copied to the output or not.
> Simple. What you are doing now is to *guess* the meaning of these attributes
> and to replace it with something else that may or may not have the same
> meaning.

It was our responsibility to do this since far before last week. The fact that
we didn't wasn't an assertion that it wasn't our responsibility. We just got
around to trying to fix a bug that needed to be fixed.

> It's not your responsibility to change the meaning of my code.
> 
> All the current hack does is to add confusion.

I've mentioned it multiple times already. It's our responsibility to both make
sure MediaWiki outputs valid markup and make sure that when we change the
handling of WikiText we don't just break syntax itself that used to work
entirely without good reason. In this situation that means transforming
WikiText attributes like align into css so that the same WikiText still works
for most use-cases. In this case it means transforming align="center" to
style="text-align: center;" on everything except <table>. The CSS does not
center nested block elements, but most instances of align are used to center
inline text. So this allows valid markup that still works in most cases but may
need a few tweaks to WikiText in cases where a block element was relied on (ie:
probably adding auto-margins to it).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to