aboutsummaryrefslogtreecommitdiff
path: root/src/cssparser.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-20 16:46:40 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-20 16:46:40 +0100
commit55aa036aa93cb096ee572625c685b2a228cdc668 (patch)
treed469ab9086e063cf243aaa8902df1fb4c2f5dda3 /src/cssparser.cc
parent5254928eed42186869555ac082eb184dd4522ac3 (diff)
ignore unknown HTML elements
Diffstat (limited to 'src/cssparser.cc')
-rw-r--r--src/cssparser.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index 92ed78ac..c12b26fe 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -875,8 +875,9 @@ static void Css_parse_ruleset (CssParser *parser)
selector = NULL;
if (parser->ttype == CSS_TK_SYMBOL) {
- selector = new CssSelector ();
- selector->element = a_Html_tag_index(parser->tval);
+ int element = a_Html_tag_index(parser->tval);
+ if (element != -1)
+ selector = new CssSelector (element);
Css_next_token (parser);
} else if (parser->ttype == CSS_TK_CHAR && parser->tval[0] == '*') {
selector = new CssSelector ();