Bug 264736 - WebVTT Parser doesn't parse region id settings correctly
Summary: WebVTT Parser doesn't parse region id settings correctly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-13 05:54 PST by Kueno
Modified: 2023-11-16 23:49 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kueno 2023-11-13 05:54:02 PST
The current WebVTT parser incorrectly interprets the region id setting string `'id: foo'` as a region with an id of `''`. However, this behavior deviates from the specification. According to the spec, the parser should initially split the input string based on spaces. If the first `':'` in a setting string is either the first or last character of that string, it should proceed to the next string. In the case of `'id: foo'`, it should be parsed as `'id:'` and `'foo'`, both of which are considered invalid id strings.

WPT: https://wpt.fyi/results/webvtt/parsing/file-parsing/tests/regions-id.html?label=experimental&label=master&aligned
Comment 1 Kueno 2023-11-13 06:00:10 PST
Pull request: https://github.com/WebKit/WebKit/pull/20413
Comment 2 Kueno 2023-11-15 06:15:12 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/43174
Comment 3 EWS 2023-11-16 23:48:28 PST
Committed 270868@main (30dd17f24fc4): <https://commits.webkit.org/270868@main>

Reviewed commits have been landed. Closing PR #20413 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2023-11-16 23:49:14 PST
<rdar://problem/118551267>