changeset 965:9b0b8ae9b06a

parse style attr only if needed
author corvid <corvid@lavabit.com>
date Sun, 01 Mar 2009 12:34:00 +0100
parents 7d3aefaf2626
children dfc29c3df4f7
files src/html.cc
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/html.cc	Fri Feb 27 10:07:05 2009 +0100
+++ b/src/html.cc	Sun Mar 01 12:34:00 2009 +0100
@@ -3343,14 +3343,13 @@
       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)