Welcome! » Log In » Create A New Profile

CollectErrors and disappearing attributes

Posted by vandroid 
CollectErrors and disappearing attributes
May 27, 2008 05:13AM

Just a little bug i've found in Demo section:

input:

<table width="100" border=1 background="img.jpg">
  <tr>
    <td></td>
  </tr>
</table>

1. default settings, output:

<table width="100" border="1"><tr><td></td>
</tr></table>

2. CollectErrors = Yes, output:

<table>
<tr>
<td></td>
</tr>
</table>

So we've lost all attributes.

Ok, now i know that CollectErrors is experimental feature and is subject to errors, but for HTML Purifier newbies like me this behaviour may look frustrating.

Don't get me wrong, your project is awesome and saved me from reinventing my own stuff :)

Re: CollectErrors and disappearing attributes
May 27, 2008 03:37PM

Hello, it looks like this is a bug that has been fixed in the trunk of HTML Purifier (the error goes away if you check Use experimental features. :-P) If you want to use it, try the nightlies.

Re: CollectErrors and disappearing attributes
May 29, 2008 12:02PM

Thanks!

Author:
Your Email:

Subject:

HTML input is enabled. Make sure you escape all HTML and angled brackets with &lt; and &gt;.

Auto-paragraphing is enabled. Double newlines will be converted to paragraphs; for single newlines, use the pre tag.

Allowed tags: a, abbr, acronym, b, blockquote, caption, cite, code, dd, del, dfn, div, dl, dt, em, i, ins, kbd, li, ol, p, pre, s, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var.

For inputting literal code such as HTML and PHP for display, use CDATA tags to auto-escape your angled brackets, and pre to preserve newlines:

<pre><![CDATA[
Place code here
]]></pre>

Power users, you can hide this notice with:

.htmlpurifier-help {display:none;}

Message: