| Summary: | TextDecoder should ignore byte-order-mark like other browsers and spec | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||
| Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | annevk, cdumez, darin, esprehn+autocc, ews-watchlist, kangil.han, mmaxfield, webkit-bug-importer, ysuzuki | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Alex Christensen
2020-09-02 16:42:26 PDT
Created attachment 407831 [details]
Patch
Is this a dupe of bug 169858 or a dupe of bug 203832? Both, I guess. *** Bug 169858 has been marked as a duplicate of this bug. *** *** Bug 203832 has been marked as a duplicate of this bug. *** Created attachment 407864 [details]
Patch
Comment on attachment 407864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407864&action=review > Source/WebCore/dom/TextDecoder.cpp:72 > + if (stream && length < bytesNeededForFullBOMIgnoreCheck()) > + return WaitForMoreBOMBytes::Yes; I also need to check if the bytes start with what may become a byte order mark here. If they're other bytes, I need to return WaitForMoreBOMBytes::No Comment on attachment 407864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407864&action=review >> Source/WebCore/dom/TextDecoder.cpp:72 >> + return WaitForMoreBOMBytes::Yes; > > I also need to check if the bytes start with what may become a byte order mark here. If they're other bytes, I need to return WaitForMoreBOMBytes::No I guess the function would have a name like isBOMPrefix. |