ladybird/Userland/Libraries/LibWeb/HTML/Parser
Max Wipfli f808279769 LibWeb: Implement encoding sniffing algorithm
This patch implements the HTML specification's "encoding sniffing
algorithm", which is used when no encoding can be obtained from the
Content-Type header (either because it doesn't contain a charset=...)
value or the file has not been opened via HTTP (as with local files).

It also modifies the creator of the HTMLDocumentParser to use the new
HTMLDocumentParser::create_with_uncertain_encoding static method, which
runs the encoding sniffing algorithm before instantiating the parser.

This now allows us to load local HTML pages (or remote pages without a
charset specified in the 'Content-Type' header) with a non-UTF-8
encoding such as 'windows-1252'. This would previously crash the
browser. :^)
2021-05-18 21:02:07 +02:00
..
Entities.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Entities.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
HTMLDocumentParser.cpp LibWeb: Implement encoding sniffing algorithm 2021-05-18 21:02:07 +02:00
HTMLDocumentParser.h LibWeb: Implement encoding sniffing algorithm 2021-05-18 21:02:07 +02:00
HTMLEncodingDetection.cpp LibWeb: Implement encoding sniffing algorithm 2021-05-18 21:02:07 +02:00
HTMLEncodingDetection.h LibWeb: Implement encoding sniffing algorithm 2021-05-18 21:02:07 +02:00
HTMLToken.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
HTMLToken.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
HTMLTokenizer.cpp LibWeb: Utilize SourceLocation for HTMLTokenizer logging 2021-04-25 09:32:03 +02:00
HTMLTokenizer.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ListOfActiveFormattingElements.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ListOfActiveFormattingElements.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StackOfOpenElements.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StackOfOpenElements.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00