News for hackers. Stuff that matters.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lucideer on Friday April 13, 2018 @09:54AM (#16829978)
To put a slightly different spin on the same story as perspective always colours the telling:

W3C decided to deprecate HTML in favour of XHTML. Most of the web quickly moved to XHTML. One individual (an employee at Opera, then Mozilla, finally and currently Google) wrote an oddly influential opinion piece saying the the move to XHTML had been somehow harmful and pushed for the major browser vendors to form a rival non-democratic standards body (WHATWG) to the W3C, which forked and completely redefined HTML.

The W3C, which unlike the WHATWG has many voting members from many backgrounds, not all related to browser making, quite understandably was never fully on board with the new WHATWG HTML spec efforts. However, with the level of adoption and support it received (mainly from being the creation of the powerful browser vendors) W3C were eventually pressured into conceding to advocate for HTML. Which they've done by maintaining a copy, rather than blindly directing people to the work by what for all intents and purposes effectively amounts to a rival organisation, and an extremely undemocratic one at that.

As web developers, we should follow the WHATWG and ignore the W3C, because the W3C have lost the political battle for HTML and we need to get our stuff working on browsers, all of whom follow WHATWG. But that's an unfortunately pragmatic approach that shouldn't amount to acceptance.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by Sharlin on Friday April 13, 2018 @10:46AM (#16830439)
> Most of the web quickly moved to XHTML.

This simply is not true. The web moved to an XHTML-like dialect of HTML which was still served as text/html and browsers interpreted it as "HTML soup" because actually serving pages as application/xhtml+xml would have broken the majority of the web because browsers would actually validate them and refuse to display a page at all if there was even a single missing close tag.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lucideer on Friday April 13, 2018 @11:38AM (#16830999)
> This simply is not true. The web moved to an XHTML-like dialect of HTML

You're thinking of XHTML 1.1 or XHTML 2. That "XHTML-dialect" that everyone switched to was called "XHTML 1.0", which allowed serving as either content type.

If you're choosing to nitpick about the fact that most sites published would not have worked if served as application/xhtml+xml, I'd invite you to do a survey of sites currently being served as valid HTML5. It's not even that easy to verify as the Nu validator version in use varies so much depending on where it's hosted (or if it's a local jar), and which iteration of the living standard it conforms to is always ambiguous. Have you tried reading the WHATWG spec diffs?

The burden on devs who might like to adhere to any kind of strict automated verification of spec. conformance is now out of the question. With XHTML, even if you were serving non-well-formed XML with a text/html content-type, at least your markup could be trivially checked for conformance by almost any XML parser to see why it's not well-formed. It was actually conceivably viable to put that check into build steps or CI.

Serving application/xhtml+xml was a nice to have, but anyone believing that serving XHTML as text/html had no value completely missed the point. At least now, years later, the mess we're stuck with should make it a little easier to see though.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by jerf on Friday April 13, 2018 @01:15PM (#16831925)
OK, so by lucideer's quirky definition of "XHTML", the vast majority of the web moved to XHTML. Based on the expansiveness of lucideer's definition, this appear to have encompassed web developers who probably weren't even aware they were writing "XHTML".

By the definition that most of us are using, which is that XHTML is complaint XHTML that could be rendered without error in browser's XHTML modes, to a first approximation nobody ever did it. Even today XHTML-levels of precision in HTML requires an awful lot of API support and very careful usage; doing it ten years ago was above almost everybody's skill level.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lucideer on Friday April 13, 2018 @01:37PM (#16832135)
> by lucideer's quirky definition

Which also happens to be the definition the w3c xhtml 1.0 spec. You can choose to think that's quirky, please don't attribute it to me.

> definition that most of us are using, which is that XHTML is complaint XHTML that could be rendered without error in browser's XHTML modes

Which, again, is the definition used in the later w3c xhtml 1.1 & 2 specs, the former which wasn't widely used, the latter which was abandoned without being published at all.

If your issue with XHTML was that W3C were moving towards a direction you disagreed with, then you don't have an issue with the version of XHTML that was in popular use.

> XHTML-levels of precision in HTML requires an awful lot of API support and very careful usage

I'm not really sure where this view comes from. HTML validation is a lot more complex and difficult to achieve than XML well formedness, and HTML4/XHTML1 validation were both far simpler than modern HTML5 validation (the Nu validator is inordinately complex in comparison to the older DTD one). Furthermore, dev tools for ensuring XML well-formedness are far more readily available and integrated into most things even today, while HTML5 validation is such an obscure concept today I'm sure many devs don't even know it's a thing.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by ubernostrum on Friday April 13, 2018 @03:12PM (#16833058)
Which also happens to be the definition the w3c xhtml 1.0 spec. You can choose to think that's quirky, please don't attribute it to me.

Except that the number of people who actually implemented valid, well-formed, properly-served XHTML Strict -- of any version -- in compliance with all the relevant specifications is at best vanishingly tiny. XHTML Transitional was tag soup.

Your retort further up about many sites serving invalid HTML5 actually works against you, since HTML5 explicitly has a forgiving parsing model, while XHTML is explicitly "every error is a fatal error". If browsers had enforced the XHTML approach on every document using an XHTML DOCTYPE, we would have seen the death of XHTML much earlier.

This is why people say XHTML was never really adopted -- many people certainly put a "/>" to close their empty elements, and stuck an XML prolog and an XHTML DOCTYPE up at the top, but surveys like the infamous "XHTML 100" showed that next to nobody actually adopted XHTML in a manner compliant with the relevant standards.

And I say this as someone who, way back in the early 00's, was serving valid, well-formed XHTML as application/xhtml+xml. XHTML was a terrible approach, and the W3C process was dragging farther and farther from practicality at every revision (remember XHTML 2.0?).

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by fourthark on Friday April 13, 2018 @07:58PM (#16834945)
You're taking about the ease of validation. Everyone else is talked about the ease of writing.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by kuschku on Saturday April 14, 2018 @07:58AM (#16836950)
Oh, you mean like AMP, which now every major site supports, and which is even stricter than XHTML?
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by adamrezich on Saturday April 14, 2018 @05:39PM (#16839676)
Turns out, when there's financial incentive to use strict syntax, people will... guess that's all XHTML lacked...
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by Hello71 on Sunday April 15, 2018 @10:11AM (#16842676)
I mean... yeah? "there must be an actual benefit to do something that costs me development time = money". XHTML did not offer this.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by hsivonen on Friday April 13, 2018 @12:55PM (#16831744)
> If you're choosing to nitpick about the fact that most sites published would not have worked if served as application/xhtml+xml, I'd invite you to do a survey of sites currently being served as valid HTML5.

Completely different thing. XML processing and all reasoning based on the premise of XML processing are fiction when XHTML is served as text/html. The HTML parsing algorithm and tve rest of the processing requirements is not fiction when HTML is invalid.

(Why are we still talking about this in 2018. Sigh.)

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by wink on Friday April 13, 2018 @03:02PM (#16832974)
Because someone asked and it explains some of the history quite nicely.

FWIW, maybe I'm the 1% but I wrote valid XHTML 1.0 for a while, but also soon gave up :P

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by Semaphor on Friday April 13, 2018 @07:36PM (#16834853)
I did server side browser sniffing to give IE the version it understood (IIRC it couldn't handle well-formed XHTML served with the proper mime tag, not sure, it's been a while :D) while everything else got proper fully compliant XHTML. I'm pretty sure I used a code snippet from Anne van Kesteren who is also posting here ;)
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by xtian on Friday April 13, 2018 @10:59AM (#16830566)
And the versions of IE in use didn’t support application/xhtml+xml anyway so you would have to switch to text/html based on the user agent string.

It was never clear what the technical benefit of this was supposed to be. I only ever saw one site whose pages served double duty as an API and UI by serving styled XML. It seemed like a challenging approach to pull off well.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by spiralx on Monday April 16, 2018 @12:13PM (#16850066)
I wrote an XSL stylesheet that turned an HTML page into a pretty-printed and syntax highlighted display of its source code.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by duskwuff on Friday April 13, 2018 @03:02PM (#16832977)
The shoe web site skechers.com used to do this. With the removal of XSL support from browsers, though, it looks like it's now using some form of JS templating.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by chias on Friday April 13, 2018 @11:28AM (#16830883)
The Gentoo website / handbook does this.

Or rather, did this a few years ago when I was last messing around with Gentoo. It seems to be HTML now.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by Hello71 on Sunday April 15, 2018 @10:14AM (#16842687)
The Handbook was interesting in that it was one of the few sites that actually went with the XML + XSLT = XHTML route. Of course, nobody knows XSLT, and everyone hates XML, so it was dumped in favor of MediaWiki, which everyone still hates, but at least now mostly understands how to use. (although the same people that insisted we use XML+XSLT also insisted we use SMW, which is even worse... I gave up then, but I hear they're trying to undo SMW now.)
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by chias on Sunday April 15, 2018 @12:26PM (#16843339)
Interesting!

What's SMW? I'm not familiar with the term and searching for it isn't being particularly helpful.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by Hello71 on Tuesday April 17, 2018 @09:12AM (#16857915)
Semantic MediaWiki
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by coding123 on Friday April 13, 2018 @11:19AM (#16830783)
Oh I remember this period of time and damn this is true. I think about 80% of the pages on the web during a certain time period had that tramp-stamp of XHTML Validated button somewhere on the page.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by jopsen on Friday April 13, 2018 @11:38AM (#16831002)
Only the cool sites :)
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by riquito on Friday April 13, 2018 @11:55AM (#16831195)
And you couldn't use target="_blank" in anchors...
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by AgentME on Friday April 13, 2018 @08:25PM (#16835071)
I remember the fierce battle in my mind trying to judge whether I wanted a proper strict xhtml page, or I wanted external links to open in a separate window... This was literally what drove me away from strict xhtml. Everything else I was on board for at the time.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by ChrisSD on Friday April 13, 2018 @10:01AM (#16830038)
I'm not certain that it's true to say most of the web quickly moved to XHTML. Sure a number of sites advertised themselves as XHTML but they were not strictly XHTML compliant. This could be due to third party widgets or other included code or it could be due to a mistake in template construction. Whatever the issue fully compliant XHTML wasn't used much in practice outside of hand-crafted pages.

Also Internet Explorer, for example, never implemented XHTML which would have been a deal breaker for many sites.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lucideer on Friday April 13, 2018 @11:45AM (#16831090)
> they were not strictly XHTML compliant

The vast majority were not strictly XHTML compliant, but whatever the figure was, I'd imagine it wasn't too different to all the many "strictly HTML compliant" sites now (compliant according to which commit?).

The point was they used XHTML, which means they could trivially choose to validate and test their XML well-formedness with built-in tools everyone had ready access to. Exposing your end-users to those conformance checks (i.e. the in-browser strict XML-parser) wasn't the only "value" offered.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by ubernostrum on Friday April 13, 2018 @03:14PM (#16833073)
The point was they used XHTML, which means they could trivially choose to validate and test their XML well-formedness with built-in tools everyone had ready access to.

I'm honestly trying to figure out whether this is satire or not.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by tptacek on Friday April 13, 2018 @10:00AM (#16830024)
That seems to ignore the conventional wisdom that according-to-Hoyle XHTML was a DOA standard because it mandated error handling in ways that no browser implemented and most of the authoring community didn't want. Authors don't write well-formed XML, even today.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lucideer on Friday April 13, 2018 @12:04PM (#16831274)
> it mandated error handling

XHTML 1.0 didn't mandate so-called "draconian error-handling", it just offered it as an optional feature.

XHTML 1.1 (which was released but noone used) and XHTML 2 (which was never finished nor released) did mandate it. I wasn't a big fan of that decision, I don't think it would've worked, but XHTML 1.1 was still very usable while ignoring that one requirement; throwing out the baby with the bath water was a massive overreaction on the WHATWG's part.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by ubernostrum on Friday April 13, 2018 @03:14PM (#16833081)
XHTML, other than Transitional, which nobody should count as "implementing XHTML", is an XML application. It inherits XML's parsing model. Every error is a fatal error.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by anonymfus on Friday April 13, 2018 @10:05AM (#16830075)
>because it mandated error handling in ways that no browser implemented

IIRC Opera implemented XHTML error handling.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by kalleboo on Friday April 13, 2018 @10:43AM (#16830403)
IIRC several major browsers implemented XHTML error handling, but only for documents with a Content-Type: application/xhtml+xml header, which was basically nothing because that would then trip up other browsers
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by rimliu on Friday April 13, 2018 @10:48AM (#16830461)
Opera had the "draconical" approach, where upon the error you just had that, an error. Firefox, iirc had a softer approach where you still got the page rendered, but you'd get the error reported too. Anyway it all depended on the proper MIME type for the XTHML (as it should). However the whole MIME type and everything associated with it (some elements and APIs are treated differently) is a whole barrel of worms, so XHTML in any of the incarnations was never a good idea.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by winkeltripel on Friday April 13, 2018 @11:02AM (#16830602)
> "draconical"

That's xml error handling, following rules as written.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by tptacek on Friday April 13, 2018 @11:08AM (#16830655)
"Draconian" error handling is a term of art in HTML.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by colanderman on Friday April 13, 2018 @10:33AM (#16830327)
> not all related to browser making, quite understandably was never fully on board with the new WHATWG HTML spec efforts.

That's the other thing that pisses me off about the WHATWG, is how much they shit all over XML and other interoperability technologies. E.g. their URL standard (because, why not fuck the IETF as well) basically ignores anything non-HTTP for specious reasons.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by bzbarsky on Friday April 13, 2018 @11:42AM (#16831058)
The only reason there is a URL standard in the WHATWG is that the IETF URL RFC didn't define error handling and this led to interop problems. So there was a need for a URL standard that _would_ define error handling. The IETF refused to produce one (basically said "fuck you, we don't care about your use cases or interop problems" with slightly more polite wording), so the WHATWG ended up doing it...

I'm not saying this is a great situation. I'm not saying the WHATWG couldn't try to do better at considering non-HTTP or non-browser use cases here. But the representatives of those use cases in the IETF told browsers to take a hike. And then browsers did.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by kuschku on Saturday April 14, 2018 @08:01AM (#16836959)
The first line of the WHATWG URL spec says that it deprecates and replaces all IETF URL standards.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by bzbarsky on Wednesday April 18, 2018 @10:42PM (#16872952)
For its target audience (browsers and web pages) it does.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by hsivonen on Friday April 13, 2018 @01:04PM (#16831832)
A number of folks involved in WHATWG work bought into the XML vision initially, but reality has a strong text/html bias and we've been able to adjust views as experience has accimulated.

See https://annevankesteren.nl/2011/02/xml-tired

(Personally, the first time I managed to get funding to work on a Web engine was to make Gecko's XHTML-as-XML support better. At the time, I thought it was so important that I sought funding to get it done...)

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by annevk on Friday April 13, 2018 @12:53PM (#16831725)
What do you mean by non-HTTP? It handles URLs whose scheme is not http(s): just fine...
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by colanderman on Friday April 13, 2018 @01:07PM (#16831850)
I forget the specifics, but there are several incompatibilities between the IETF URI and IRI spec and the WHATWG URL spec (see [1], EDIT: as I'm sure you're well aware, given your username). The WHATWG spec amounts to "what four popular web browsers do", explicitly without considering compatibility with the hundreds (thousands?) of other non-web-browser tools that make use of URIs.

What you've defined are effectively not URLs. Very similar, but different. If you wanted to call them "WHATWGRLs" or something I wouldn't care. But they're not URLs, and the WHATWG is choosing to muddy the waters rather than, say, specify an optional legacy compatibility layer on top of the IETF spec. It's one thing to say "in addition to IETF URIs, browsers should also accept these malformed URIs, but should not accept these valid but problematic URIs"… it's quite another to say "URIs aren't that anymore, now they're this".

[1] https://daniel.haxx.se/blog/2016/05/11/my-url-isnt-your-url/

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by annevk on Saturday April 14, 2018 @12:00PM (#16837871)
I'm not sure I get the distinction. As for curl, it doesn't follow any standard which seems worse, but does at least helpfully demonstrate that the RFCs cannot be implemented by major clients.
Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by dragonwriter on Friday April 13, 2018 @12:28PM (#16831512)
> Most of the web quickly moved to XHTML

No, it didn't.

At best a large share of new, greenfield development moved to XHTML, but I'm not convinced it was a majority of even that.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by Hello71 on Friday April 13, 2018 @10:03AM (#16830059)
> Most of the web quickly moved to XHTML

Ridiculous and absurd. A small proportion of the web moved to invalid XHTML that rendered as tag soup because it was sent as text/html. Virtually no websites actually served XHTML as XHTML, because: 1. there were and still are no compelling technical benefits of XHTML, 2. it broke Internet Explorer, 3. most webmasters were and still are incompetent and have no clue what Content-Type is.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by coldtea on Friday April 13, 2018 @10:59AM (#16830571)
>W3C decided to deprecate HTML in favour of XHTML. Most of the web quickly moved to XHTML.

In some parallel universes, yes.

Even if so, there's also the fact that XHTML wasn't updated itself with features people needed.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lucideer on Friday April 13, 2018 @11:48AM (#16831138)
What features?

If you're referring to "features" in the HTML5 spec., like canvas, webgl, geolocation, DOM etc. they were separate specs, which WHATWG lumped into one monolith (though they're mainly JavaScript APIs, and aren't directly related to HTML). They were being worked on separately to XHTML, and still work fine with XHTML to this day.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by coldtea on Friday April 13, 2018 @12:32PM (#16831546)
>they were separate specs, which WHATWG lumped into one monolith

For which I could not care less. Whether there's a big spec for HTML5+JS APIs, or 20 different specs, is a bureaucratic concern, not a concern to the developers or the end users.

W3C might had them "neatly" separated, by it also haven't moved them notch towards completion and release for more than a decade.

I've used and worked for the web before W3C, in its heyday, in its long decline days when we waiting a decade+ for some progress, and after it become irrelevant. Now it's a way better situation.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lambda on Friday April 13, 2018 @11:11AM (#16830689)
> Most of the web quickly moved to XHTML.

Most of the web didn't move to XHTML.

A lot of people who were interested in being standards compliant moved to XHTML 1.0 Transitional, which was the HTML compatibility subset, but they only ever served it and validated it as HTML, not XHTML, because if you served it as XHTML, one single stray < that someone had forgotten to quote somewhere would break the parsing of the whole page.

The piece written by Hixie was influential because it was a wake up call that the direction the standards bodies were going in was pretty much fruitless, and that there could be a much better way to do it which wouldn't involve breaking compatibility with all of the existing content and would give web developers and users features that they actually wanted.

> As web developers, we should follow the WHATWG and ignore the W3C, because the W3C have lost the political battle for HTML and we need to get our stuff working on browsers, all of whom follow WHATWG. But that's an unfortunately pragmatic approach that shouldn't amount to acceptance.

I fail to see how there is anything unfortunate about this. What about rewriting everything in XHTML 2.0 (https://www.w3.org/TR/2010/NOTE-xhtml2-20101216/), and having to be extremely conscious of any possible stray < that could sneak in to a page without being quoted, would have been preferable to:

1. Consistent parsing support for existing content, and content that might have slight problems like stray <, in all browsers

2. Standardization of things that people actually use to build web apps, like XMLHttpRequest and Canvas

3. Consistent handling of encodings between browsers, including encoding sniffing

4. Consistent handling of quirks mode vs. standards mode between browsers

5. Actually having browsers support compatibility with vendor-prefixed versions of features, because some browsers widely used introduced prefixed features that web developers actually started relying upon

And also, have you ever tried getting involved with the WHATWG process? I have, and I find that they are very receptive to intelligent discussion of issues.

What doesn't work well is to insist that you have a problem and that this particular solution must be used to address the problem; because a lot of times, it's easy to come up with some proposed solution but it then turns out that it's either a lot more complex in practice, your proposal does't fit in with the rest of the ecosystem well, or the problem can actually be solve just in tooling on top of HTML without having to change the spec at all and then wait for multiple browser vendors to all independently implement it.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by tathougies on Friday April 13, 2018 @11:40AM (#16831038)
> and having to be extremely conscious of any possible stray < that could sneak in to a page without being quoted, would have been preferable to:

Any system that publishes content that would let this kind of thing pass is incredibly insecure, and shouldn't be on the internet. Today it's a stray <. Tomorrow it's a stray <script>

It's no wonder software is where it is today with attitudes like these.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lambda on Friday April 13, 2018 @12:36PM (#16831585)
Not if that < had slipped in because it was in a piece of static text in a string somewhere in the source code.

You can apply mandatory quoting to untrusted input all you want, but there are going to be times when you have trusted strings that can still contain stray characters that will make the resulting markup invalid. And in many cases you don't want to have mandatory quoting for all of that, because these strings may have markup you want to include.

And yeah, you can argue that instead of generating content by appending strings, you should be building up a proper type-safe DOM structure that can be serialized. I'll wait while you go boil the ocean of converting every single web application framework that exists now outside of a couple of obscure type-safe functional programming frameworks, and in the meantime I'll be able to browse the real web without every other page giving me validation errors.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by tathougies on Friday April 13, 2018 @01:54PM (#16832301)
To be fair, I only use obscure type-safe functional programming frameworks. That's what I'm employed to do, and this obviously impacts my feelings on the matter. Personally, I think it's irresponsible to use anything that could be this unsafe. This doesn't mean everyone needs to use FP, just that frameworks and libraries should be chosen so as to guarantee safety. There are easy-to-use libraries for all these things in every language.

In no other world of engineering is this attitude okay. If you were a civil engineer and had to hold a license to practice due to the danger your designs could present to society, this attitude would eventually cause you to lose your ability to practice. It's becoming more and more clear that software can have similar levels of impact, and software engineers should practice as scuh.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lambda on Friday April 13, 2018 @03:10PM (#16833048)
I agree with you that we do need to do better about writing more robust software, and type safe languages are a good way to do that.

But what you're saying is as if you suggest that since the metric system is more consistent and more widely used than the English, I as a bolt distributor should start selling my bolts in metric sizes, despite the fact that the nuts that everyone has are in English sizes.

The browser vendors, at least, are working on implement their browsers in more type-safe languages (https://github.com/servo/servo), but even still they have to work with the content that is produced by thousands of different languages, frameworks, and tools, and millions of hand written HTML files, templates, and the like. Just turning on strict XML parsing doesn't make that go away, it just makes your browser fail on most websites.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by tathougies on Friday April 13, 2018 @04:18PM (#16833558)
A good first step in enforcing web standards would be if browsers would detect these rule violations, and -- instead of failing -- put a giant banner on the top of the page warning end users that the site may be compromised and could compromise data.

Soon, every business will be clamoring to fix their buggy software, and users will still be able to access the unsafe websites they so desire.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by greenhouse_gas on Friday April 13, 2018 @08:42PM (#16835153)
You can be unsafe even with typesafe builders. See

fn build(text_to_show: &str) -> HTML{ HTML(Body(H1(text_to_show))) }

What if text_to_show wasn't sanitized? You got yourself a XSS. And if you do sanitize it (and keep it in a StrSanitized type), what are the chances of accidental XSS?

Really, what should have been done is a "user supplied tag", which automatically displays everything as plain text, like <user-supplied id="ahdjdh37736xhdhd"> Content </user-supplied id="ahdjdh37736xhdhd">

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by lambda on Friday April 13, 2018 @09:20PM (#16835275)
You would generally want the general purpose string type in your language to always be escaped when serializing, and only allow avoiding that if you opt-in explicitly.

So, for instance you'd have an H1::new(contents: TextNode) constructor, and you'd have to build a TextNode; if you build TextNode::new(text: &str), then it would escape it. If you wanted to explicitly pass in raw HTML, then you'd need something like HTMLFragment::from_str(&str), and it would parse and return the fully parsed and appropriately typed fragment object that could then be used to build larger fragments.

There might be some way to unsafely opt out, like HTMLFragment::from_str_raw(&str), that would just give a node that when traversed would just be dumped raw into the output, but that would be warned against and only used if you wanted to avoid the cost of parsing and re-serializing some large, known-safe fragment; it wouldn't be what you would normally use.

Re:Microsoft, Google, Mozilla, and Apple Object to W3C Fork ... by tathougies on Saturday April 14, 2018 @12:50PM (#16838144)
Your builder isn't really using types to guarantee safety. You can write untyped programs in a strongly typed language, by just coercing everything to strings, but this isn't what I mean when I say 'type-safety'.