Sniff <!-- as HTML to match Chrome
Categories
(Core :: Networking, enhancement, P2)
Tracking
()
People
(Reporter: valentin, Assigned: valentin)
References
Details
(Keywords: webcompat:platform-bug, Whiteboard: [necko-triaged], [wptsync upstream])
Attachments
(4 external files)
According to mimesniff <!-- should be followed by space or > to be sniffed as HTML. But Chrome does it regardless.
This bug is to match that behaviour (with a pref)
| Assignee | ||
Comment 1•9 months ago
|
||
| Assignee | ||
Comment 2•9 months ago
|
||
| Assignee | ||
Updated•9 months ago
|
Updated•9 months ago
|
Comment 5•9 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ba8b7fc9f987
https://hg.mozilla.org/mozilla-central/rev/621e87a0bb78
| Assignee | ||
Comment 9•9 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D279843
Updated•9 months ago
|
Comment 10•9 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Webcompat issues when pages are served without a content type, and they start with a <!--comment. Note no space between !-- and the text.
See bug 2006569. - Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: See bug 2006569 comment 0
- Risk associated with taking this patch: low
- Explanation of risk level: Fixes a regression. Aligns Firefox sniffing of HTML with other browsers. Fix is really simple and behind a pref
- String changes made/needed: none
- Is Android affected?: yes
| Assignee | ||
Comment 11•9 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D279844
Updated•9 months ago
|
Updated•9 months ago
|
Comment 12•9 months ago
|
||
Reproduced the issue with Firefox 148.0a1 (2025-12-17) on Windows 11. The https://ghosttogether.net/change/password webpage is displayed in html code when opened.
The issue is verified fixed with Firefox 149.0a1 (2026-01-22) on Windows 11, macOS 15 and Ubuntu 24. While the network.mimesniff.non_standard_html_comment pref it's true (as default) the https://ghosttogether.net/change/password page is correctly displayed. Turning network.mimesniff.non_standard_html_comment will reproduce the issue again.
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Comment 13•9 months ago
|
||
| uplift | ||
Comment 14•9 months ago
|
||
Verified fixed with 148.0b7 (20260125090536) build on Windows 11, macOS 14 and Ubuntu 24. While the network.mimesniff.non_standard_html_comment pref it's true (as default) the https://ghosttogether.net/change/password page is correctly displayed. Turning network.mimesniff.non_standard_html_comment to false will reproduce the issue again.
Description
•