From 33bba1d9fdffad503f9f6529dbecc3eca261b864 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 26 Nov 2023 10:34:54 +0000 Subject: html: Avoid fetching (and decoding) linked stylesheets When the `author_level_css` option is disabled, avoid fetching stylesheets that won't be used for selection. --- content/handlers/html/css.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'content') diff --git a/content/handlers/html/css.c b/content/handlers/html/css.c index cdb94942a..7ee94c1c5 100644 --- a/content/handlers/html/css.c +++ b/content/handlers/html/css.c @@ -406,6 +406,10 @@ bool html_css_process_link(html_content *htmlc, dom_node *node) } dom_string_unref(rel); + if (nsoption_bool(author_level_css) == false) { + return true; + } + /* 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) { -- cgit v1.2.3