Bug 223174

Summary: Limit XML declaration scan in text/html to the first 1024 bytes
Product: WebKit Reporter: Henri Sivonen <hsivonen>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: ahmad.saleem792, annevk, ap, beidson, d, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Unspecified   
OS: Unspecified   

Description Henri Sivonen 2021-03-15 01:12:39 PDT
Steps to reproduce:

1. Load https://hsivonen.com/test/moz/xml-decl/kilobyte-plus-one-after.htm

Expected results:

Expected the character after "Test: " not to be ж. I.e. expected the XML declaration in text/html not take effect when its terminating greater-than sign is not within the first 1024 bytes.

Actual results:

The XML declaration syntax takes effect for character encoding indicating that the greater-than sign was scanned for past the first 1024 bytes.
 
Additional information:

Spec pull request: https://github.com/whatwg/html/pull/1752
Comment 1 Radar WebKit Bug Importer 2021-03-22 04:37:09 PDT
<rdar://problem/75685333>
Comment 2 Domenic Denicola 2021-05-06 10:44:21 PDT
The spec PR has been updated to no longer have this limit; I suggest closing.
Comment 3 Ahmad Saleem 2023-09-26 17:29:13 PDT
All browsers (Safari 17, Chrome Canary 119 and Firefox Nightly 120) all render the test case same.

Also Comment 02 suggests, we can close this?

@Anne - any input?