aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-03-01 12:34:00 +0100
committercorvid <corvid@lavabit.com>2009-03-01 12:34:00 +0100
commitca208ffd4c3b03f1e722a14d17c985daea8d9eb2 (patch)
tree9378f42bafce92499ed48c45d2a9a2399f1a72c6 /src
parente903441ffac40bcb839e61c9e515c2f844369182 (diff)
parse style attr only if needed
Diffstat (limited to 'src')
-rw-r--r--src/html.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/html.cc b/src/html.cc
index ad0f37e2..fe04ca15 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3343,14 +3343,13 @@ static void Html_parse_common_attrs(DilloHtml *html, char *tag, int tagsize)
Html_add_anchor(html, attrbuf);
}
- if (tagsize >= 11) { /* length of "<t class=i>" */
+ if (tagsize >= 11 && (prefs.parse_embedded_css || prefs.load_stylesheets)) {
+ /* length of "<t class=i>" or "<t style=i>" */
attrbuf = Html_get_attr2(html, tag, tagsize, "class",
HTML_LeftTrim | HTML_RightTrim);
if (attrbuf)
html->styleEngine->setClass (attrbuf);
- }
- if (tagsize >= 11) { /* length of "<t style=i>" */
attrbuf = Html_get_attr2(html, tag, tagsize, "style",
HTML_LeftTrim | HTML_RightTrim);
if (attrbuf)