diff --git a/src/document/css/apply.c b/src/document/css/apply.c index f94b4815..a7f03271 100644 --- a/src/document/css/apply.c +++ b/src/document/css/apply.c @@ -234,19 +234,19 @@ examine_element(struct html_context *html_context, struct css_selector *base, process_found_selector(selector, CST_PSEUDO, base); } - if (element->attr.class && seltype <= CST_CLASS) { - const unsigned char *class = element->attr.class; + if (element->attr.class_ && seltype <= CST_CLASS) { + const unsigned char *class_ = element->attr.class_; for (;;) { const unsigned char *begin; - while (*class == ' ') ++class; - if (*class == '\0') break; - begin = class; - while (*class != ' ' && *class != '\0') ++class; + while (*class_ == ' ') ++class_; + if (*class_ == '\0') break; + begin = class_; + while (*class_ != ' ' && *class_ != '\0') ++class_; selector = find_css_selector(selectors, CST_CLASS, rel, - begin, class - begin); + begin, class_ - begin); process_found_selector(selector, CST_CLASS, base); } } diff --git a/src/document/html/parser.h b/src/document/html/parser.h index cbc438d3..3df476e0 100644 --- a/src/document/html/parser.h +++ b/src/document/html/parser.h @@ -54,7 +54,7 @@ struct text_attrib { * these pointers if html_context->options->css_enable; * otherwise they remain NULL. */ unsigned char *id; - unsigned char *class; + unsigned char *class_; #endif unsigned char *select; diff --git a/src/document/html/parser/link.c b/src/document/html/parser/link.c index 02e68cc3..527a3c83 100644 --- a/src/document/html/parser/link.c +++ b/src/document/html/parser/link.c @@ -689,7 +689,7 @@ struct hlink { unsigned char *charset; unsigned char *target; unsigned char *id; - unsigned char *class; + unsigned char *class_; unsigned char *dir; */ }; diff --git a/src/document/html/parser/parse.c b/src/document/html/parser/parse.c index 17dd3b90..d4c6be3a 100644 --- a/src/document/html/parser/parse.c +++ b/src/document/html/parser/parse.c @@ -958,7 +958,7 @@ start_element(struct element_info *ei, * in our own way. --pasky */ mem_free_set(&html_top->attr.id, get_attr_val(attr, "id", html_context->doc_cp)); - mem_free_set(&html_top->attr.class, + mem_free_set(&html_top->attr.class_, get_attr_val(attr, "class", html_context->doc_cp)); /* Call it now to gain some of the stuff which might affect * formatting of some elements. */ diff --git a/src/document/html/parser/stack.c b/src/document/html/parser/stack.c index 05899490..594ef424 100644 --- a/src/document/html/parser/stack.c +++ b/src/document/html/parser/stack.c @@ -109,7 +109,7 @@ kill_html_stack_item(struct html_context *html_context, struct html_element *e) #ifdef CONFIG_CSS mem_free_if(e->attr.id); - mem_free_if(e->attr.class); + mem_free_if(e->attr.class_); #endif mem_free_if(e->attr.onclick); @@ -152,7 +152,7 @@ html_stack_dup(struct html_context *html_context, enum html_element_mortality_ty if (ep->attr.select) e->attr.select = stracpy(ep->attr.select); #ifdef CONFIG_CSS - e->attr.id = e->attr.class = NULL; + e->attr.id = e->attr.class_ = NULL; #endif /* We don't want to propagate these. */ /* XXX: For sure? --pasky */