From c6b954eb51a3241cf0aa1924270b1240aa691a2a Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Mon, 19 Jan 2009 16:49:14 +0100 Subject: avoid looping on style="{}" --- src/cssparser.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cssparser.cc') diff --git a/src/cssparser.cc b/src/cssparser.cc index f11e0a86..066a282d 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -1181,8 +1181,10 @@ CssPropertyList *a_Css_parse_declaration(const char *buf, int buflen) parser.space_separated = false; Css_next_token(&parser); - while (parser.ttype != CSS_TK_END) + do Css_parse_declaration(&parser, props, NULL); + while (!(parser.ttype == CSS_TK_END || + (parser.ttype == CSS_TK_CHAR && parser.tval[0] == '}'))); if (props->size () == 0) { delete props; -- cgit v1.2.3