summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-10 15:50:07 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-10 15:50:07 +0200
commit03da686aa2ec6c2773564f6c148fbd80da8ee833 (patch)
tree1e12155687cc1189632716f66fa58a9589e094f2 /Libraries/LibWeb
parent65c4e5cacfcaa28fdb9f234474ae2958f8cd5aaf (diff)
downloadserenity-03da686aa2ec6c2773564f6c148fbd80da8ee833.zip
LibWeb: Ignore backslashes (\) in attribute selectors
This makes us at least parse selectors like [foo=bar\ baz] correctly. The current solution here is quite hackish but the real fix will come when we implement a spec-compliant CSS parser.
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/Parser/CSSParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Parser/CSSParser.cpp b/Libraries/LibWeb/Parser/CSSParser.cpp
index a8ac658606..9759173f87 100644
--- a/Libraries/LibWeb/Parser/CSSParser.cpp
+++ b/Libraries/LibWeb/Parser/CSSParser.cpp
@@ -492,6 +492,9 @@ public:
}
continue;
}
+ // FIXME: This is a hack that will go away when we replace this with a big boy CSS parser.
+ if (ch == '\\')
+ ch = consume_one();
buffer.append(ch);
}
if (in_value)