<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Forums - Support</title>
        <description>Questions about using HTML Purifier answered here. No problem is too small.</description>
        <link>http://htmlpurifier.org/phorum/list.php?3</link>
        <lastBuildDate>Thu, 09 Sep 2010 04:25:28 -0700</lastBuildDate>
        <generator>Phorum 5.2.11</generator>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4868,4868#msg-4868</guid>
            <title>Can't get HTML Purifier to work? (3 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4868,4868#msg-4868</link>
            <description><![CDATA[<p>Hi,</p>

<p>I was recommended by some people to use htmlpurifier, basically i have a website that inserts data into a database on when outputting that data to a webpage i want htmlpurifier to remove anything bad like code tags etc convert html to it's safe equivalent and so forth.</p>

<p>I currently use htmlentities() in PHP with ENT_QUOTES to convert both single and double quotes to there safe equivalent.</p>

<p>I have gone through the documentation and am very confused.</p>

<p>1) I downloaded the latest standalone version and included it in my top.inc.php so it's included on every webpage on my site and below the include i placed the following code as stated in the documentation:</p>

<p>$purifier = new HTMLPurifier();
$clean_html = $purifier-&gt;purify($dirty_html);</p>

<p>Now from what i understand this should now work?</p>

<p>I have a guestbook i delibrately placed some js code in guestbook comment field that would display a popup and submitted it to database and removed the htmlentities() when outputting from database and thought htmlpurifier would now convert that code to it's html safe equivalent and just dusplay the html code and convert html characters like &lt;&gt; to it's html eqivalent but instead i am getting the popup showing instead which obviously means i am either doing something wrong or i am misunderstanding how to use htmlpurifier.</p>

<p>All i want is for htmlpurifier to only purify code that i tell it to, for example maybe there is a way i can add a div id so htmlpurifier only deals with anything in the div ?</p>

<p>To my understanding am i rite in thinking htmlpurifier will also alter the html code of my webpages if it finds anything to be invalid markup etc? i don't want that just to sort out the code i want it to sort out as just explained.</p>

<p>I am confused and not sure what i need to do. I have gone over the docs several time to no luck and yes my page encoding is UTF-8 and is XHTML 1 transitional as is 100% valid.</p>

<p>Sorry if i sounds confusing but just am not getting any of it at all.</p>

<p>Thanks
PHP</p>]]></description>
            <dc:creator>PHP</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 03 Sep 2010 15:19:11 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4861,4861#msg-4861</guid>
            <title>Library for installation (4 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4861,4861#msg-4861</link>
            <description><![CDATA[<p>Hi,</p>

<p>I'm a Drupal Nube and am working my way through the new stuff. HTML Purifier seems like a really cool module but I'm not clear about the installation. The directions say:</p>

<blockquote>* Extract the "library" folder and place it inside your modules/htmlpurifier
  directory.</blockquote>

<p>I'm not clear where to get the library to extract and place or what library we're talking about. Can anyone give me a little more insight?</p>

<p>Thank you.</p>]]></description>
            <dc:creator>Smarsh</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 03 Sep 2010 11:26:24 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4860,4860#msg-4860</guid>
            <title>convert &lt;b&gt; to &lt;strong&gt; in context? (2 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4860,4860#msg-4860</link>
            <description><![CDATA[<p>Hi, </p>

<p>I'm struggling a bit to understand exactly what I can expect of HTML Purifier vs. Tidy. I am a bit confused about the term 'filter', I think, so apologies if I'm expecting the wrong thing here. </p>

<p>I'm looking at using HTML Purifier as a drop in replacement for Tidy (which I have obviously configured to my needs as below) to make sure my HTML is valid on entry through an internal CMS. An example that Tidy can do, but Purifier seems to struggle with, is where both <strong>b</strong> and <strong>strong</strong> are being used around a bit of text. I want to convert to <strong>strong</strong> and keep the tags in the correct location. </p>

<p>For example, the text:</p>

<p>&lt;b&gt;bold text is strong&lt;/strong&gt; and normal text isn't.</p>

<p>Tidy makes this: </p>

<p>&lt;strong&gt;bold text is strong&lt;/strong&gt; and normal text isn't.</p>

<p>And purifier makes this: </p>

<p>&lt;b&gt;bold text is strong and normal text isn't.&lt;/b&gt;</p>

<p>Is it possible to get the Tidy behaviour in Purifier, or am I looking at the wrong tool for what I'm attempting? </p>

<p>Many thanks!</p>]]></description>
            <dc:creator>Jemima</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 03 Sep 2010 10:11:46 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4856,4856#msg-4856</guid>
            <title>Always add nofollow.. (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4856,4856#msg-4856</link>
            <description><![CDATA[<p>I made a very simple test script for testing htmlpurifier.. and it works :P the docs are a little hard to read for me. Is it possible to add a rel="nofollow" on all links?</p>

<pre>
require_once '../../library/HTMLPurifier.auto.php';

$config = HTMLPurifier_Config::createDefault();
$config-&gt;set('Core.Encoding', 'UTF-8');
$config-&gt;set('HTML.Allowed', 'a[href],b,blockquote,em,i,pre');
$config-&gt;set('HTML.Trusted', true);
$def = $config-&gt;getHTMLDefinition(true);
$purifier = new HTMLPurifier($config);

// untrusted input HTML
$html = '&lt;b&gt;Simple&lt;/b&gt;  Yes cool &lt;div&gt;&lt;b&gt;&lt;a href="" rel="nofollow"&gt;&lt;b&gt;Simple&lt;/b&gt; and short&lt;/a&gt;&lt;/div&gt;

&lt;i&gt;Italic&lt;/i&gt;

&lt;pre&gt;Awesome

Code 

here&lt;/pre&gt;
';
$pure_html = $purifier-&gt;purify($html);
echo $pure_html ;
</pre>]]></description>
            <dc:creator>con.cept.me</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 31 Aug 2010 03:40:46 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4852,4852#msg-4852</guid>
            <title>are there expressions for double br's (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4852,4852#msg-4852</link>
            <description><![CDATA[<p>Hello there,
are there expressions in HTMLPurifier for the following treatments too? 
</p>

<pre>
$comment = nl2br($comment);
$comment = preg_replace( "/(&lt;br\s?\/?&gt;)+/i","&lt;br /&gt;", $comment );    //double br's treatment
$comment = stripslashes($comment);                                   // slashes gone
</pre>]]></description>
            <dc:creator>joe from</dc:creator>
            <category>Support</category>
            <pubDate>Mon, 30 Aug 2010 14:53:12 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4851,4851#msg-4851</guid>
            <title>HTML.BlockWrapper is ignored (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4851,4851#msg-4851</link>
            <description><![CDATA[<p>hello,
this seems not work for me:</p>

<pre>
    $config = HTMLPurifier_Config::createDefault();
    $config-&gt;set('HTML.Allowed', 'a[href|[title],br,blockquote,code,strong,em,p');
    $config-&gt;set('AutoFormat.AutoParagraph','true');
    $config-&gt;set('AutoFormat.RemoveEmpty','true');

    $config-&gt;set('HTML.BlockWrapper','p');

    $purifier = new HTMLPurifier($config);
    $comment = $purifier-&gt;purify($comment);
</pre>

<p>the BlockWrapper will be ignored
whats wrong??
my input:
</p>

<pre>&lt;blockquote&gt;quote&lt;/blockquote&gt;</pre><p>
i want this output:
</p>

<pre>&lt;blockquote&gt;&lt;p&gt;quote&lt;/p&gt;&lt;/blockquote&gt;</pre>]]></description>
            <dc:creator>joe from germany</dc:creator>
            <category>Support</category>
            <pubDate>Mon, 30 Aug 2010 14:52:15 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4848,4848#msg-4848</guid>
            <title>Error with HTMLPurifier - Maximum function nexting level (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4848,4848#msg-4848</link>
            <description><![CDATA[<p>I'm purifying HTML emails that I get.</p>

<p>However, with one email PHP throws this exception and stops working:</p>

<p>Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\Users\Sebastian Hoitz\Documents\Entwicklung\kt_cli\trunk\library\HTMLPurifier\Token\Text.php on line 26</p>

<p>This happens in this method:</p>

<p>HTMLPurifier_Lexer_DOMLex-&gt;tokenizeDOM()</p>

<p>How can I help you find this bug? Do you need the HTML of the email?</p>]]></description>
            <dc:creator>Sebastian Hoitz</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 27 Aug 2010 08:59:40 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4823,4823#msg-4823</guid>
            <title>Attributes stripped on Mac (Snow Leopard) (22 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4823,4823#msg-4823</link>
            <description><![CDATA[<p>Hi,</p>

<p>  We're having an issues with Purifier on Snow Leopard.  All attribute content gets stripped out when running HTML through "HTMLPurifier()".</p>

<p>  The same code runs just fine on our Ubuntu server, but the only way to get it to work on a MacBookPro is to open the file "HTMLPurifier.standalone.php", and then re-save it.  Doing so solves the problem until the next reboot when the process needs repeating.</p>

<p>  The same issue exists in the non-standalone library, but I have no idea which file to open / re-save.</p>

<p>  Looks like there's some weird character encoding issue somewhere in the attribute handling code, but I've no idea where to look to fix it.  Any help would be appreciated.</p>

<p>Cheers.</p>]]></description>
            <dc:creator>sidepodcast</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 27 Aug 2010 08:09:39 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4787,4787#msg-4787</guid>
            <title>How to strip out &lt;?xml tag (6 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4787,4787#msg-4787</link>
            <description><![CDATA[<p>Hi all,
I am filtering a document that has the following text in their normal text paragraph</p>

<p>&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;</p>

<p>So it goes like this</p>

<p>&lt;-----Start quote----&gt;</p>

<p>In this part, we will examine implementing &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; Asynchronous event</p>

<p>&lt;-----End quote -------&gt;</p>

<p>I can't comprehend the reason for having that piece of xml there, but anyway how do i remove that?
Thanks a lot</p>]]></description>
            <dc:creator>lovehtmlpurifier</dc:creator>
            <category>Support</category>
            <pubDate>Sun, 15 Aug 2010 00:20:34 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4785,4785#msg-4785</guid>
            <title>Add rel=nofollow&quot; to every a-Tag (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4785,4785#msg-4785</link>
            <description><![CDATA[<p>Hi,
I think the subject describes my problem very well. I want the Prufiier to add rel="nofollow" to every single a-tag and overwrite existing ones.</p>

<p>Greetings</p>]]></description>
            <dc:creator>NotMe</dc:creator>
            <category>Support</category>
            <pubDate>Sat, 14 Aug 2010 17:56:20 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4781,4781#msg-4781</guid>
            <title>Fatal Error (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4781,4781#msg-4781</link>
            <description><![CDATA[<p>I just installed the last lite version on my Debian server :</p>

<p>The code :
<code>
require_once 'HTMLPurifier/HTMLPurifier.auto.php';
$purificateur = new HTMLPurifier();
</code></p>

<p>Gives me :
<code>
Fatal error: Cannot access protected property HTMLPurifier_ConfigSchema::$singleton in /home/comparateur/proteinesbox.com/HTMLPurifier/HTMLPurifier/ConfigSchema.php on line 72
</code></p>

<p>Thanks for advance :)</p>]]></description>
            <dc:creator>Bertrand</dc:creator>
            <category>Support</category>
            <pubDate>Wed, 11 Aug 2010 10:27:55 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4772,4772#msg-4772</guid>
            <title>Using AutoFormat.Linkify by links without http(s) or ftp (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4772,4772#msg-4772</link>
            <description><![CDATA[<p>Hey,</p>

<p>I'm new with HTMLPurifier. And I will use the AutoFormat.Linkify option The option works fine if I write links like: <a href="http://google.de">http://google.de</a> but nothing I write google.de or www.google.de. Is there a solution to "fix" this? </p>

<p>Kind Regards</p>]]></description>
            <dc:creator>Stefan</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 30 Jul 2010 10:06:51 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4763,4763#msg-4763</guid>
            <title>Good idea to use purifier to clean the entire $_REQUEST array? (5 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4763,4763#msg-4763</link>
            <description><![CDATA[<p>I've been thinking about implementing html purifier to ensure all inbound data POST'ed to the site is clean. </p>

<p>Here's how I was thinking about doing it... inside a globally included file, I'd add something like this:</p>

<pre>
$_REQUEST_UNTRUSTED = array();
$_REQUEST_TRUSTED = array();
foreach($_REQUEST as $key =&gt; $value) {
	$_REQUEST_UNTRUSTED[$key] = $value;
	$_REQUEST_TRUSTED[$key] = $purifier-&gt;purify($value);
}
$_REQUEST = $_REQUEST_TRUSTED;
</pre>

<p>That way everything inside the $_REQUEST used throughout the system would be completely clean. And, if for some reason I need to get the raw data (for example, in a CMS admin where you need to submit entire HTML documents via POST) you could still access the _UNTRUSTED array.</p>

<p>Does this approach sound like a good or bad idea?</p>

<p>One thing that concerns me is the performance hit this might put on our system. Purifier is a pretty major library and it might be overkill to use it for this purpose since I'm not really cleaning the output, just the input. I ran some tests stuffing 50 or so variables in the $_REQUEST and then running through a version of the above code 20 times and I was disappointed to see almost three seconds added to the total processing time based on some calculations with microtime. Without the purify calls the same page looping through the array takes no time at all.</p>

<p>Any direction you can give would be appreciated. If we just need to tune it for this purpose to make it perform better or use something else better suited for this approach, please let me know. I haven't really looked into what options I should use as far as the filters go, I just loaded up the standalone and ran it.</p>

<p>Thanks!</p>]]></description>
            <dc:creator>Luke</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 27 Jul 2010 18:52:58 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4755,4755#msg-4755</guid>
            <title>html comments inside the script tag (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4755,4755#msg-4755</link>
            <description><![CDATA[<p>HTMLPurifier is removing HTML comments inside of the &lt;script&gt; tag:</p>

<pre>
&lt;script type="text/javascript"&gt;
&lt;!--
some javascript code here
//--&gt;
&lt;/script&gt;
</pre>

<p>becomes</p>

<pre>
&lt;script type="text/javascript"&gt;
some javascript code here
//&lt;/script&gt;
</pre>

<p>I have set <b>Output.CommentScriptContents</b> to <b>false</b> and <b>HTML.Trusted</b> to <b>true</b>. If I set <b>Output.CommentScriptContents</b> to <b>true</b> HTMLPurifier adds its own comments. I would like it to just keep the comments already there. Is this possible?</p>]]></description>
            <dc:creator>cogo</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 20 Jul 2010 17:48:57 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4747,4747#msg-4747</guid>
            <title>&lt;base&gt; element (4 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4747,4747#msg-4747</link>
            <description><![CDATA[<p>Hi,</p>

<p>Again a new question. I am not getting the base tag to work. Take this snippet as example:
</p>

<pre>
&lt;base href="<a href="http://htmlpurifier.org/art/">http://htmlpurifier.org/art/</a>" /&gt;

&lt;img src="bglogo.png" alt="" /&gt;
</pre>

<p>Solution 1:
The img src is modified to: <a href="http://htmlpurifier.org/art/bglogo.png">http://htmlpurifier.org/art/bglogo.png</a></p>

<p>Solution 2:
The base tag is allowed, no modifications are made.</p>

<p>I don't get one of the two solutions to work.... Any help please.</p>]]></description>
            <dc:creator>Jochem</dc:creator>
            <category>Support</category>
            <pubDate>Wed, 21 Jul 2010 02:11:22 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4745,4745#msg-4745</guid>
            <title>Three questions on html purifier (2 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4745,4745#msg-4745</link>
            <description><![CDATA[<p>Hello! Forgive for my English, simply it wash not a native language.</p>

<p>At first I would like to thank developers for such fine tool, it became the present find for me.</p>

<p>There were only a few small questions.
1. Whether probably to make so, what html purifier automatically would delete double blanks? Output.Newline allows to transform a blank into a tag , for example, but it would be desirable to learn how to transform 2 and more blanks into one
2. Whether probably to make so, what html purifier automatically would transform unnecessary inverted commas in their HTML-essence?
3. How to me to prohibit certain attributes of a tag? For example I do not want that users would use attribute class in tags div and span</p>

<p>In advance thanks!</p>]]></description>
            <dc:creator>Studentsov</dc:creator>
            <category>Support</category>
            <pubDate>Mon, 19 Jul 2010 10:09:42 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4740,4740#msg-4740</guid>
            <title>Double quoting font-family (2 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4740,4740#msg-4740</link>
            <description><![CDATA[<p>Howdy,</p>

<p>Brand new user of this, my gosh, über-library.  Thanks for the tremendous work.</p>

<p>I'm stumped by a very simple thing.  The «unpurified» HTML I used for a test contains a tag with the style attribute, which has a font-family instruction.  Seems like multi-words font families trigger HTML Purifier to double quote them, which is unusual but certainly proper (I don't know the standard, but I'm sure I'm a loose coder for not double quoting them).  What is odd though, is that the double quotes are transformed by Purifier into their corresponding entity.</p>

<p>INPUT:
</p>

<pre>
&lt;span style="font-family:arial black, avant garde;"&gt;something&lt;/span&gt;
</pre>

<p>OUTPUT:
</p>

<pre>
&lt;span style="font-family:"arial black", "avant garde";"&gt;something&lt;/span&gt;
</pre>

<p>An explanation of that behaviour would be nice, and instructions on how to prevent it if need be would be also useful.</p>

<p>NOTE: the -- &amp; quot; -- entity does not show in the output above, since it is replaced by -- " --</p>

<p>Thanks</p>]]></description>
            <dc:creator>Kafkaah</dc:creator>
            <category>Support</category>
            <pubDate>Thu, 15 Jul 2010 13:40:45 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4738,4738#msg-4738</guid>
            <title>parsing special characters (2 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4738,4738#msg-4738</link>
            <description><![CDATA[<p>when I parse the following html:</p>

<pre>
require_once('includes/htmlpurifier/library/HTMLPurifier.auto.php');

$config = HTMLPurifier_Config::createDefault();
$config-&gt;set('Core.Encoding', 'utf-8');
$config-&gt;set('HTML.Doctype', 'XHTML 1.0 Strict');

$purifier = new HTMLPurifier($config);

$old_html = '&amp;bull;';
$new_html = $purifier-&gt;purify( $old_html );

echo $new_html;

</pre>

<p>I get this:</p>

<p>â€¢</p>

<p>what am I doing wrong here? :p</p>

<p>regards</p>]]></description>
            <dc:creator>iCon</dc:creator>
            <category>Support</category>
            <pubDate>Thu, 15 Jul 2010 13:27:02 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4730,4730#msg-4730</guid>
            <title>External images are being stripped... (5 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4730,4730#msg-4730</link>
            <description><![CDATA[<p>Hi guys,</p>

<p>I'm extremely new to all this html purification, but I employed the light version successfully to fix my WYSIWYG editor to make it XHTML compliant. However, I have noticed that if I add an external image to a content item it gets stripped. Is this normal?</p>

<p>How do I fix it?</p>

<p>Thanks for the help, RJP1</p>]]></description>
            <dc:creator>RJP1</dc:creator>
            <category>Support</category>
            <pubDate>Sat, 10 Jul 2010 14:48:07 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4726,4726#msg-4726</guid>
            <title>XPath / CSS selectors for elements? (2 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4726,4726#msg-4726</link>
            <description><![CDATA[<p>Hi. To make a long story short, I'm having trouble with extra markup when pasting stuff into TinyMCE from MS Word. Everything is fine except lists which end up looking like:</p>

<pre>
&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Content&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Content&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</pre>

<p>which makes issues for coloring and styling. So I'd like to allow P, but disallow LI&gt;P (strip paragraphs if direct children of list items).</p>

<p>Can CSS or XPath selectors be used for element lists (allow, forbid)? If not, are there any plans to do so?</p>]]></description>
            <dc:creator>Dado</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 09 Jul 2010 02:39:52 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4724,4724#msg-4724</guid>
            <title>Whitelist Forms (no replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4724,4724#msg-4724</link>
            <description><![CDATA[<p>I use HTML Purifier to clean input in my CMS. Many of my clients like to have PayPal donation buttons in their site, but HTML Purifier strips the forms out. I noticed that HTML Purifier has a HTMLPurifier_HTMLModule_Forms class, but I don't know if that does what I want. If it does, how do I enable it?</p>

<p>Thanks!</p>

<p>I have also posted this question on Stack Overflow, if you'd prefer to answer it there:
<a href="http://stackoverflow.com/questions/3189396/whitelist-forms-in-html-purifier-configuration">http://stackoverflow.com/questions/3189396/whitelist-forms-in-html-purifier-configuration</a></p>]]></description>
            <dc:creator>Edward Savage</dc:creator>
            <category>Support</category>
            <pubDate>Wed, 07 Jul 2010 07:38:17 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4723,4723#msg-4723</guid>
            <title>How to add attributes? (3 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4723,4723#msg-4723</link>
            <description><![CDATA[<p>I want to run HTMLPurifier to restrict the set of allowed tags. I allow the A tag, but I'd like to add the attribute 'target="_top"' to each A tag.</p>

<p>Where inside this engine do I best hook in to perform this? I imagine it has to be some kind of hook that runs late. Also, the 'target' attribute is not part of my generally allowed set of attributes (HTML.AllowdAttributes).</p>

<p>Any hints appreciated!</p>]]></description>
            <dc:creator>jwatte</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 16 Jul 2010 13:51:13 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4718,4718#msg-4718</guid>
            <title>HTML.SafeObject consumes lots of memory (2 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4718,4718#msg-4718</link>
            <description><![CDATA[<p>Hello there, </p>

<p>I have some problems when using the HTML.SafeObject option. The difference in our system is that when this option is set on our LMS takes 27.64Mb in order to render the page, but when the HTML.SafeObject is commented the page is loaded with 14.42Mb. Did somebody already have this kind of memory leak problems?</p>

<p>I'm using the HTMLPurifier 4.1 but is the same thing if you test it with HTMLPurifier 3.3.</p>

<p>If i'm using a server configuration with a memory limit of 20mb I get this fatal error:</p>

<p>htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 33</p>]]></description>
            <dc:creator>Julio Montoya</dc:creator>
            <category>Support</category>
            <pubDate>Thu, 24 Jun 2010 08:15:25 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4701,4701#msg-4701</guid>
            <title>Incorrect purification (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4701,4701#msg-4701</link>
            <description><![CDATA[<p>We are trying to purify xhtml snippets while allowing only 4 tags: b, i, sub, sup</p>

<p>Our configuration:
</p>

<pre>
$config = HTMLPurifier_Config::createDefault();
$config-&gt;set('HTML.Allowed', 'i,b,sub,sup');
</pre>

<p>
Input:
</p>

<pre>
&lt;b&gt;Option 1:&lt;/b&gt; a&lt;b
</pre>

<p>Expected Output:
</p>

<pre>
&lt;b&gt;Option 1:&lt;/b&gt; a&amp;lt;b
</pre>

<p>Actual Output:
</p>

<pre>
&lt;b&gt;Option 1:&lt;/b&gt; a&lt;b&gt;&lt;/b&gt;
</pre>


<p>
Even worse when haven something like that:
Input:
</p>

<pre>
&lt;b&gt;Option 1:&lt;/b&gt; a&lt;c (normal case)
</pre>

<p>Expected Output:
</p>

<pre>
&lt;b&gt;Option 1:&lt;/b&gt; a&amp;lt;c (normal case)
</pre>

<p>Actual Output:
</p>

<pre>
&lt;b&gt;Option 1:&lt;/b&gt; a
</pre>


<p>
Another:
Input:
</p>

<pre>
Dear &lt;your-name-here&gt;, you are...
</pre>

<p>Expected Output:
</p>

<pre>
Dear &amp;lt;your-name-here&amp;gt;, you are...
</pre>

<p>Actual Output:
</p>

<pre>
Dear , you are...
</pre>


<p>
It seems that in either case the &lt; followed by a non-whitespace character is recognized as a tag which is in my opinion wrong. With this behaviour user input like "Dear , you are..." ist not possible. Am I missing some configuration settings?
</p>
<p>
Thanks for any help on this.
</p><p>
Regards Michael</p>]]></description>
            <dc:creator>rollim</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 18 Jun 2010 05:32:00 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4696,4696#msg-4696</guid>
            <title>small bug (5 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4696,4696#msg-4696</link>
            <description><![CDATA[<p>MS office system message</p>

<pre>
&lt;?xml:options &gt;
</pre>

<p>replaced with</p>

<pre>
&amp;lt;?xml:options &amp;gt;
</pre>]]></description>
            <dc:creator>Herman</dc:creator>
            <category>Support</category>
            <pubDate>Sun, 20 Jun 2010 18:28:43 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4695,4695#msg-4695</guid>
            <title>name in a tag (3 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4695,4695#msg-4695</link>
            <description><![CDATA[<pre>
&lt;a name='test' href='test'&gt;fff &lt;/a&gt;
</pre>

<p>I have a question - what parameters should be set if I want to save the attribute "name" as a result</p>]]></description>
            <dc:creator>Herman</dc:creator>
            <category>Support</category>
            <pubDate>Fri, 18 Jun 2010 05:19:39 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4694,4694#msg-4694</guid>
            <title>Incorrect purification (2 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4694,4694#msg-4694</link>
            <description><![CDATA[<p>This is the code that I have:
</p>

<pre>
 $config = HTMLPurifier_Config::createDefault();

        // configuration goes here:
        $config-&gt;set('Core.Encoding', 'UTF-8');
        $config-&gt;set('HTML.Doctype', 'HTML 4.01 Transitional');
        $config-&gt;set('HTML.TidyLevel', 'heavy');
        $config-&gt;set('Filter.ExtractStyleBlocks.TidyImpl', true);
        $config-&gt;set('HTML.AllowedElements', 'a,b,i,u,p,br,ul,ol,li,img,span,div');
	$config-&gt;set('Core.EscapeInvalidChildren', true);
        //$config-&gt;set('HTML.Trusted', true);
        $config-&gt;set('Attr.EnableID', true);
        $config-&gt;set('HTML.SafeObject', true);
        $config-&gt;set('Output.FlashCompat', true);
        $config-&gt;set('Filter.YouTube', true);
	$config-&gt;set('Cache.DefinitionImpl', null);
	$config-&gt;set('HTML.SafeEmbed', true);


        $purifier = new HTMLPurifier($config);

        
        $pure_html = $purifier-&gt;purify($dirty_html);
</pre><p>
But when I try to purify <code>&lt;a style="jjj" href="kkk"&gt;&lt;div&gt;what&lt;/div&gt;&lt;/a&gt;</code> it returns:
<code>&lt;a href="kkk" rel="nofollow"&gt;&lt;/a&gt;&lt;div&gt;&lt;a href="kkk" rel="nofollow"&gt;what&lt;/a&gt;&lt;/div&gt;&lt;a href="kkk" rel="nofollow"&gt;&lt;/a&gt;</code>
Any Ideas how to correct it will be really appreciated.
Thanks</p>]]></description>
            <dc:creator>phpnewbie</dc:creator>
            <category>Support</category>
            <pubDate>Sun, 20 Jun 2010 23:27:33 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4681,4681#msg-4681</guid>
            <title>Purify only ExternalResources (1 reply)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4681,4681#msg-4681</link>
            <description><![CDATA[<p>hello, and thx for the nice library.</p>

<p>i would like to use html purifier on an iso8859-7 site ( i really have problems using greek because pretty much all the chars are going escaped) but i want ONLY to disallow the external resources. </p>

<p>How can i skip all the other filters?</p>

<p>now i use the following code to config the purifier</p>

<p>$config = HTMLPurifier_Config::createDefault();</p>

<p>$config-&gt;set('Core.Encoding', 'ISO-8859-7');</p>

<p>$config-&gt;set('URI.DisableExternalResources', true);</p>

<p>but as a result i escape all the greek chars BUT the images are still there....</p>

<p>i really i dont care about html filtering except the image filtering so i want to escape the filtering of the greek chars and make work the DisableExternalResources option...</p>

<p>thx in advance</p>]]></description>
            <dc:creator>groger</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 15 Jun 2010 09:40:37 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4669,4669#msg-4669</guid>
            <title>How to make html purifier IGNORE REL attribute all together? (3 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4669,4669#msg-4669</link>
            <description><![CDATA[<p>Im using lightbox2 with ubercart and it sets up its links as rel="lightbox[$relcount]" which is dynamically generated, so i cant realistically add them to AllowedRels.
I just want html purifier to ignore rel attribute all together. In another topic you mentioned HTMLPurifier/AttrDef/HTML/LinkTypes.php but i cant make sense of it right away.
Can you suggest a quick way to ignore RELs all together?
Thanks</p>]]></description>
            <dc:creator>vladgur</dc:creator>
            <category>Support</category>
            <pubDate>Sat, 12 Jun 2010 11:17:25 -0700</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,4659,4659#msg-4659</guid>
            <title>Customize style attribute (6 replies)</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,4659,4659#msg-4659</link>
            <description><![CDATA[<p>I'm wracking my brain as i don't find the way to filter out the elements that don't accomplish the following:</p>

<p>&lt;span style="text-align:right"&gt;Text&lt;/span&gt;</p>

<p>The examples i've seen so far consider just one attribute but this is an special case as there's on property inside the attribute!!. This is how far i got:</p>

<p>$def-&gt;addAttribute('span', 'style', 'Enum#text-align')); But then, how do i check if it is right, left,...?</p>

<p>Does anybody know how to solve this if there's a way??</p>

<p>Thanks</p>]]></description>
            <dc:creator>Joss</dc:creator>
            <category>Support</category>
            <pubDate>Sun, 13 Jun 2010 23:59:19 -0700</pubDate>
        </item>
    </channel>
</rss>
