ladybird/Libraries/LibWeb
Luke 6ffcd53479 LibWeb: Fix character references losing characters in certain situations
This fixes 4 issues:
- RECONSUME_IN_RETURN_STATE was functionally equivalent to
  SWITCH_TO_RETURN_STATE, which caused us to lose characters.
  For example, &test= would lose the =

- & characters by themselves would be lost. For example, 1 & 2
  would become 1 2. This is because we forgot to flush
  characters in the the ANYTHING_ELSE path in CharacterReference

- Named character references didn't work at all in attributes.
  This is because there was a path that was checking the entity
  code points instead of the entity itself. Plus, the path that
  was checking the entity itself wasn't quite spec compliant.

- If we fail to match a named character reference, the first
  character is lost. For example &test would become &est.
  However, this relies on a little hack since I can't wrap my
  head around on how to change the code to do as the spec says.
  The hack is to reconsume in AmbigiousAmpersand instead of
  just switching to it.

Fixes #3957
2020-12-29 17:39:08 +01:00
..
Bindings Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
CodeGenerators LibWeb: Generate the CSS::ValueID enum and its helper functions 2020-12-15 20:40:10 +01:00
CSS LibWeb: Don't leave "border" CSS property around after expansion 2020-12-20 11:59:40 +01:00
DOM Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
DumpLayoutTree LibWeb: Add missing license header to DumpLayoutTree 2020-12-08 23:41:45 +01:00
HighResolutionTime LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
HTML LibWeb: Fix character references losing characters in certain situations 2020-12-29 17:39:08 +01:00
Layout LibWeb: Only preserve full whitspace for white-space: pre{,-wrap} 2020-12-18 11:04:29 +01:00
Loader LibWeb: Don't use ByteBuffer::wrap() when loading about: URLs 2020-12-19 18:29:13 +01:00
Page Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
Painting LibWeb: Move border painting from Layout::Box to a free function 2020-12-04 18:02:21 +01:00
Scripts LibWeb: Move CSS classes into the Web::CSS namespace 2020-07-26 20:05:15 +02:00
SVG LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
Tests Base+LibJS+LibWeb: Make prettier clean 2020-12-27 21:25:27 +01:00
UIEvents LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
CMakeLists.txt LibWeb: Generate the CSS::ValueID enum and its helper functions 2020-12-15 20:40:10 +01:00
DOMTreeModel.cpp LibWeb: Implement <template> parsing 2020-08-21 11:57:11 +02:00
DOMTreeModel.h LibGUI: Move GUI::Model::Role to GUI::ModelRole 2020-08-16 16:44:09 +02:00
Dump.cpp LibC: Fix some incorrect printf usages 2020-12-26 10:05:50 +01:00
Dump.h LibWeb: Allow dumping layout tree into a StringBuilder 2020-12-08 23:36:19 +01:00
FontCache.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
FontCache.h LibWeb: Improvements to font lookup 2020-12-14 20:43:25 +01:00
Forward.h LibWeb: Apply 'min-width' and 'max-width' constraints to replaced boxes 2020-12-12 00:29:49 +01:00
InProcessWebView.cpp LibGUI: Show tooltip after a small delay 2020-12-28 21:28:40 +01:00
InProcessWebView.h LibWeb+WebContent: Add on_load_finish hook to web views 2020-12-08 23:36:19 +01:00
LayoutTreeModel.cpp LibWeb: Rename LayoutNode::is_root() => is_initial_containing_block() 2020-12-04 16:27:07 +01:00
LayoutTreeModel.h LibGUI: Move GUI::Model::Role to GUI::ModelRole 2020-08-16 16:44:09 +02:00
Namespace.cpp LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
Namespace.h LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
Origin.h LibWeb: Add Origin::is_same(const Origin&) 2020-09-22 20:10:20 +02:00
OutOfProcessWebView.cpp LibWeb: Fill OOPWV with the palette base color until we have pixels 2020-12-29 00:47:30 +01:00
OutOfProcessWebView.h LibWeb: Fill OOPWV with the palette base color until we have pixels 2020-12-29 00:47:30 +01:00
QualifiedName.h LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
StylePropertiesModel.cpp LibGUI: Move GUI::Model::Role to GUI::ModelRole 2020-08-16 16:44:09 +02:00
StylePropertiesModel.h LibGUI: Move GUI::Model::Role to GUI::ModelRole 2020-08-16 16:44:09 +02:00
TreeNode.h Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
URLEncoder.cpp LibWeb: Use the URL encoder from AK instead of rolling a custom one 2020-06-15 17:56:00 +02:00
URLEncoder.h Meta+LibHTTP through LibWeb: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
WebContentClient.cpp LibWeb+WebContent: Add on_load_finish hook to web views 2020-12-08 23:36:19 +01:00
WebContentClient.h LibWeb+WebContent: Add on_load_finish hook to web views 2020-12-08 23:36:19 +01:00
WebViewHooks.h LibWeb+WebContent: Add on_load_finish hook to web views 2020-12-08 23:36:19 +01:00