summaryrefslogtreecommitdiff
path: root/render/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/html.c')
-rw-r--r--render/html.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/render/html.c b/render/html.c
index b49f05f91..759c24433 100644
--- a/render/html.c
+++ b/render/html.c
@@ -766,7 +766,7 @@ static bool html_meta_refresh_process_element(html_content *c, dom_node *n)
if (equiv == NULL)
return true;
- if (strcasecmp(dom_string_data(equiv), "refresh") != 0) {
+ if (!dom_string_caseless_lwc_isequal(equiv, corestring_lwc_refresh)) {
dom_string_unref(equiv);
return true;
}
@@ -982,8 +982,8 @@ static bool html_meta_refresh(html_content *c, dom_node *head)
}
/* Recurse into noscript elements */
- if (strcasecmp(dom_string_data(name),
- "noscript") == 0) {
+ if (dom_string_caseless_lwc_isequal(name,
+ corestring_lwc_noscript)) {
if (html_meta_refresh(c, n) == false) {
/* Some error occurred */
dom_string_unref(name);
@@ -995,8 +995,8 @@ static bool html_meta_refresh(html_content *c, dom_node *head)
dom_node_unref(n);
return true;
}
- } else if (strcasecmp(dom_string_data(name),
- "meta") == 0) {
+ } else if (dom_string_caseless_lwc_isequal(name,
+ corestring_lwc_meta)) {
if (html_meta_refresh_process_element(c,
n) == false) {
/* Some error occurred */
@@ -1428,7 +1428,8 @@ html_process_style_element(html_content *c,
/* type='text/css', or not present (invalid but common) */
exc = dom_element_get_attribute(style, corestring_dom_type, &val);
if (exc == DOM_NO_ERR && val != NULL) {
- if (strcasecmp(dom_string_data(val), "text/css") != 0) {
+ if (!dom_string_caseless_lwc_isequal(val,
+ corestring_lwc_text_css)) {
dom_string_unref(val);
return true;
}
@@ -1675,14 +1676,14 @@ html_process_stylesheet(dom_node *node, dom_string *name, void *vctx)
hlcache_child_context child;
/* deal with style nodes */
- if (strcasecmp(dom_string_data(name), "style") == 0) {
+ if (dom_string_caseless_lwc_isequal(name, corestring_lwc_style)) {
if (!html_process_style_element(ctx->c, &ctx->count, node))
return false;
return true;
}
/* if it is not a link node skip it */
- if (strcasecmp(dom_string_data(name), "link") != 0) {
+ if (!dom_string_caseless_lwc_isequal(name, corestring_lwc_link)) {
return true;
}
@@ -1705,7 +1706,8 @@ html_process_stylesheet(dom_node *node, dom_string *name, void *vctx)
/* type='text/css' or not present */
exc = dom_element_get_attribute(node, corestring_dom_type, &type_attr);
if (exc == DOM_NO_ERR && type_attr != NULL) {
- if (strcasecmp(dom_string_data(type_attr), "text/css") != 0) {
+ if (!dom_string_caseless_lwc_isequal(type_attr,
+ corestring_lwc_text_css)) {
dom_string_unref(type_attr);
return true;
}