<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>strip style attributes code and Firefox 3.0.1 (Mozilla 5)</title> 
  <pubDate>Thu, 09 Apr 2026 21:57:59 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7380</link> 
  <atom:link rel="self" type="application/rss+xml" title="strip style attributes code and Firefox 3.0.1 (Mozilla 5)" href="https://bugs.horde.org/ticket/7380/rss" /> 
  <description>strip style attributes code and Firefox 3.0.1 (Mozilla 5)</description> 
 
   
   
  <item> 
   <title>I have a HTML email message that is not rendered correctly i</title> 
   <description>I have a HTML email message that is not rendered correctly in IMP (it mixes with the IMP code).



I think that the correct behavior is to strip the style tags, but this didn&#039;t happens in Firefox 3.0.1.



There is a test in lib/Horde/MIME/Viewer/html.php that checks for the major version of Mozilla.

This triggers the strip style attributes code / regexp in xss.php.



But It is checking only against version 4; Firefox 3.0.1 major version is 5, so the strip style code

doesn&#039;t runs.</description> 
   <pubDate>Tue, 23 Sep 2008 20:53:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7380#t49175</link> 
  </item> 
   
  <item> 
   <title>This has nothing to do with each other. It&#039;s always possible</title> 
   <description>This has nothing to do with each other. It&#039;s always possible that an HTML message is breaking the page layout, you have to live with that if you enable inline rendering of HTML messages.

That being said, we *do* filter out style tags for any browser when rendering those messages inline. It&#039;s a bug if that doesn&#039;t happen. Please upload an example message.</description> 
   <pubDate>Tue, 23 Sep 2008 21:18:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7380#t49176</link> 
  </item> 
   
  <item> 
   <title>&gt; This has nothing to do with each other. It&#039;s always possib</title> 
   <description>&gt; This has nothing to do with each other. It&#039;s always possible that an 

&gt; HTML message is breaking the page layout, you have to live with that 

&gt; if you enable inline rendering of HTML messages.



Yes, I know.



&gt; That being said, we *do* filter out style tags for any browser when 

&gt; rendering those messages inline. It&#039;s a bug if that doesn&#039;t happen.



But the style tags are not being filtered out, because of the Mozilla version.

The code from html.php is:



$strip_style_attributes = (($browser-&gt;isBrowser(&#039;mozilla&#039;) &amp;&amp;

                                    $browser-&gt;getMajor() == 4) ||

                                   $browser-&gt;isBrowser(&#039;msie&#039;));



So when $browser-&gt;getMajor() == 5, $strip_style_attributes = 0



If I change the code to accept the 5 version, then strip_style_attributes = 1

and the page is rendered ok.

 

&gt; Please upload an example message.



Uploaded as an attachment.</description> 
   <pubDate>Tue, 23 Sep 2008 21:45:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7380#t49177</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; That being said, we *do* filter out style tags for any br</title> 
   <description>&gt;&gt; That being said, we *do* filter out style tags for any browser when

&gt;&gt; rendering those messages inline. It&#039;s a bug if that doesn&#039;t happen.

&gt;

&gt; But the style tags are not being filtered out, because of the Mozilla 

&gt; version.



style tags != style attributes</description> 
   <pubDate>Wed, 24 Sep 2008 16:54:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7380#t49194</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; That being said, we *do* filter out style tags for any b</title> 
   <description>&gt;&gt;&gt; That being said, we *do* filter out style tags for any browser when

&gt;&gt;&gt; rendering those messages inline. It&#039;s a bug if that doesn&#039;t happen.

&gt;&gt;

&gt;&gt; But the style tags are not being filtered out, because of the Mozilla

&gt;&gt; version.

&gt;

&gt; style tags != style attributes



Sorry, what I mean are the style attributes . Those are that are not being

filtered out as they should.

</description> 
   <pubDate>Wed, 24 Sep 2008 17:16:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7380#t49196</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/imp/lib/MIME/Viewer/html.php?r1=1.148&amp;r2=1.149&amp;ty=u</description> 
   <pubDate>Wed, 24 Sep 2008 17:16:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7380#t49197</link> 
  </item> 
   
  <item> 
   <title>We filter out &quot;position: absolute&quot; styles now.</title> 
   <description>We filter out &quot;position: absolute&quot; styles now.</description> 
   <pubDate>Wed, 24 Sep 2008 17:17:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7380#t49198</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
