diff options
author | corvid <corvid@lavabit.com> | 2009-03-01 12:34:00 +0100 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-03-01 12:34:00 +0100 |
commit | ca208ffd4c3b03f1e722a14d17c985daea8d9eb2 (patch) | |
tree | 9378f42bafce92499ed48c45d2a9a2399f1a72c6 | |
parent | e903441ffac40bcb839e61c9e515c2f844369182 (diff) |
parse style attr only if needed
-rw-r--r-- | src/html.cc | 5 |
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) |