Bug 223174 - Limit XML declaration scan in text/html to the first 1024 bytes
Summary: Limit XML declaration scan in text/html to the first 1024 bytes
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-15 01:12 PDT by Henri Sivonen
Modified: 2023-09-27 14:48 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?