Better HN
topnewbestaskshowjobs
Log inSign up

zcorpan

40 karma · joined Sep 20, 2016 (10y ago) · 26 submissions

https://x.com/zcorpan/
Submissions

comment 1w ago · link · parent

The extension/polyfill path solves most security concerns, but not all. With `<xsl:output method="html"/>`, libxslt writes the text of `style` and `script` elements unescaped, and the polyfill, Chrome and Safari then reparse the output as HTML. So if a stylesheet puts data in a `<style>` or `<script>`, that data can become markup that runs attacker-controlled script. Firefox's native XSLT builds the DOM directly and keeps it as text. This is a mutation-XSS kind of bug, and it's inherent to reparsing libxslt's output; not solved by sandboxing. I'm trying to close the mutation-XSS hole in general, and XSLT keeping it open would be unfortunate.

Further, the polyfill has limitations, some unfixable or not worth the complexity. For example, it can't trigger quirks mode in XML, or perfectly emulate all quirks.

The polyfill is a stop-gap meant to ease the transition. It's not proof that browsers can keep supporting XSLT with perfect compatibility and get rid of all security concerns.

comment 1y ago · link · parent

Good point! We've adjusted the plan so that it's 100% of beta (starting today). Thanks.

comment 1y ago · link · parent

The spec allows multiple top-level headings: https://html.spec.whatwg.org/multipage/sections.html#heading...

comment 1y ago · link · parent

TFA has been fixed to make this clearer. Thanks!

comment 1y ago · link · parent

As of 2022 (when the outline algorithm was removed from the spec), it's a problem with your website implementation.

comment 1y ago · link · parent

They do if you include <meta name="color-scheme" content="light dark">

Also see https://github.com/whatwg/html/issues/5426

comment 1y ago · link · parent

There is no warning in that case.

comment 1y ago · link · parent

Nested lists have 0 block-margin and different list-style-type. But that seems to be about it...

comment 1y ago · link · parent

The article says

> Do not rely on default browser styles for conveying a heading hierarchy. Explicitly define your document hierarchy using <h2> for second-level headings, <h3> for third-level, etc.

comment 1y ago · link · parent

It only worked visually. For screen reader users, all headings are level 1. If you switch to using h2 etc, it will be more accessible.

comment 1y ago · link · parent

What is your bug?

comment 1y ago · link · parent

Someone has to be first. :-)

comment 1y ago · link · parent

There's a new proposal to address this: https://github.com/whatwg/html/issues/5033

comment 1y ago · link · parent

This is already the case, the warning is only for h1 in article/aside/nav/section. I'll fix the article to make this clearer, thanks.

comment 1y ago · link · parent

Fixed, thanks.

comment 1y ago · link · parent

Good point. Now fixed!

comment 1y ago · link · parent

Yes.

comment 1y ago · link · parent

The feedback loop is Firefox's "report broken site" in the Help menu. Success is there are no reports about broken sites due to this change, or the breakage is minor -- differently sized headings and different margins on some pages is expected and is acceptable. Sites becoming unusable is not acceptable.

comment 1y ago · link · parent

It has been in the spec since 2009: https://github.com/whatwg/html/commit/0ed655652d52f0ab068fcb...

comment 1y ago · link · parent

Chrome doesn't implement the change yet, only the deprecation warning. So you can check the console in devtools or run a Lighthouse check.

comment 1y ago · link · parent

Some testing has already happened before starting the rollout.

The change has been shipping in Firefox Nightly for a year. I have analyzed impact of affected pages in the HTTP Archive dataset (about 12,000,000 pages), twice:

https://github.com/whatwg/html/issues/7867#issuecomment-1977... https://github.com/whatwg/html/issues/7867#issuecomment-2595...

The next step is either rollout or ship directly.

comment 1y ago · link · parent

Firefox also has a built-in "broken website" reporter in the Help menu, which sends a report to Mozilla. The WebCompat team analyzes those reports and can decide to report a Gecko bug if it has a bug, contact the website if they have a bug, or apply a sitepatch. We're also monitoring the broken website reports for regressions from this change in particular.

I understand that a rollout makes reproduction harder, and not everyone will be aware of the change. It's a tradeoff when deciding whether to do a rollout or ride the trains normally.

comment 1y ago · link · parent

To test in Firefox with the new behavior, set layout.css.h1-in-section-ua-styles.enabled to false in about:config.

Rolling out potentially risky changes in this way is not new, and is also a strategy that other browsers employ. It allows for course-correcting if necessary and is less disruptive than shipping to 100% of users directly.

comment 2y ago · link · parent

I don't disagree that it's sufficient, but also, ideally different people would implement the spec. If you have a particular mental model or understanding of a part of the spec that doesn't match what the spec actually says, that is likely to translate identically when writing a second implementation.

comment 6y ago · link · parent

Blog post about the guide: https://bocoup.com/blog/introducing-the-web-platform-contrib...

comment 10y ago · link · parent

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/...

In Chrome Canary 55.0.2866.0 the noscript element contains a text node and a link element. This matches the spec as far as I can tell; whitespace is allowed in noscript in head.