<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Advices for some allowed characters</title>
        <description>Hi guys,

I am currently working on a web application that uses HTML Purifier.
We created a class that altready filtered attacks from our forms but we wanted to add another tool more efficient. That's the reason why we recently installed your package of classes.

The problem is that there's a behaviour we would like to remove, the encoding of &quot;some&quot; characters.

Ex. we have a form with an input type=&quot;text&quot;. The customer wants to write &quot;this is &amp;lt; my text&quot;
He validate is data by submitting.
Using you class to filter the data, when we want to display the data there's written: &quot;this is &amp;amp;nbsp; my text&quot;

How can we control this behaviour? I notice that the encoding happened at this sentence:
$this-&amp;gt;strategy-&amp;gt;execute(  $lexer-&amp;gt;tokenizeHTML( $html, $config, $context), $config, $context   )

We really don't know how to allows &quot;&amp;lt;&quot; &quot;&amp;gt;&quot; in the context of sentences, words...

If you could help us?


Regards

Edited 1 time(s). Last edit at 02/05/2009 10:15AM by Ambush Commander.</description>
        <link>http://htmlpurifier.org/phorum/read.php?2,2960,2960#msg-2960</link>
        <lastBuildDate>Tue, 21 May 2013 04:03:30 -0400</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,3042#msg-3042</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,3042#msg-3042</link>
            <description><![CDATA[<p>Thanks you for advices...</p>

<p>You're true, we were misusing your classes.</p>

<p>We're looking for phpids, do you know? It seems to be a good filter.</p>

<p>Laurent</p>]]></description>
            <dc:creator>laurent</dc:creator>
            <category>General</category>
            <pubDate>Wed, 18 Feb 2009 11:36:18 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,3031#msg-3031</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,3031#msg-3031</link>
            <description><![CDATA[<p>HTML Purifier is for HTML only..</p>

<p>if you're filtering plaintext fields such as name &amp; email, then don't use Purifier because it's wasting resources of the server because it's not actually needed when you can use other methods with less overhead.</p>

<p>instead you can use PHP 5 native filters such as filter_var($text, FILTER_SANITIZE_EMAIL) &amp; then filter_var($text, FILTER_VALIDATE_EMAIL) for email fields.</p>

<p>let HTMLPurifier be used for what it's designed for :)</p>

<p>ps. sorry for jumping in on the thread, i was just as confused as ambush by your follow up and image of what you require.</p>]]></description>
            <dc:creator>vaughan</dc:creator>
            <category>General</category>
            <pubDate>Fri, 13 Feb 2009 16:46:07 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2999#msg-2999</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2999#msg-2999</link>
            <description><![CDATA[<p>I still don't understand. By the letter of your example, that's what HTML Purifier already does. However, you shouldn't be using HTML Purifier for author and email fields.</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>General</category>
            <pubDate>Tue, 10 Feb 2009 10:25:23 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2998#msg-2998</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2998#msg-2998</link>
            <description><![CDATA[<p>Hi,</p>

<p>take a look a this scenario.</p>

<pre><a href="http://img15.imageshack.us/img15/4808/formca2.jpg">http://img15.imageshack.us/img15/4808/formca2.jpg</a></pre>

<p>
Do you understand now? Is it possible to do what I want? It is possible to configure purify class to do what I want?</p>

<p>
Let me know</p>]]></description>
            <dc:creator>laurent</dc:creator>
            <category>General</category>
            <pubDate>Tue, 10 Feb 2009 09:26:06 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2991#msg-2991</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2991#msg-2991</link>
            <description><![CDATA[<p>Can you post some sample inputs and what you would like to see happen with those inputs? It sounds like you're looking for a validator, but I'm not sure.</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>General</category>
            <pubDate>Mon, 09 Feb 2009 10:56:31 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2986#msg-2986</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2986#msg-2986</link>
            <description><![CDATA[<p>Hi,</p>

<p>I'm sorry but this is not what I am asking...</p>

<p>Basically we want to control and filter naughty html tags whereas we don't want to encode it!</p>

<p>For example if I write on an input of a form this text "this is &lt; my text " I want that the class Purify checks if the string is correct and not, in other words if there isn't a script into the input or something that can cause damage.</p>

<p>
We only want to know if it is possible to remove the html entities when filter by the class.</p>]]></description>
            <dc:creator>laurent</dc:creator>
            <category>General</category>
            <pubDate>Mon, 09 Feb 2009 08:08:29 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2973#msg-2973</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2973#msg-2973</link>
            <description><![CDATA[<p><a href="http://htmlpurifier.org/demo.php?filter%5BAutoFormat.AutoParagraph%5D=0&amp;filter%5BAutoFormat.DisplayLinkURI%5D=0&amp;filter%5BAutoFormat.Linkify%5D=0&amp;filter%5BAutoFormat.RemoveEmpty%5D=0&amp;filter%5BNull_CSS.AllowedProperties%5D=1&amp;filter%5BCore.CollectErrors%5D=0&amp;filter%5BNull_HTML.Allowed%5D=1&amp;filter%5BNull_HTML.Doctype%5D=1&amp;filter%5BHTML.TidyLevel%5D=medium&amp;filter%5BURI.DisableExternalResources%5D=0&amp;filter%5BNull_URI.Munge%5D=1&amp;html=this+is+%3E+my+text&amp;submit=Submit">Seems to work for me.</a></p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>General</category>
            <pubDate>Fri, 06 Feb 2009 16:08:46 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2972#msg-2972</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2972#msg-2972</link>
            <description><![CDATA[<p>Hi guys,</p>

<p>yes I'm sorry i mean if the customer write this text "this is &lt; my text" 
when we use purify method the output becomes "this is </p>

<pre>&amp;lt;</pre><p>".</p>

<p>How could I change this behaviour? I mean I would like to allow customer to write this character "&lt;" o this one "&gt;" without encodes it...</p>]]></description>
            <dc:creator>laurent</dc:creator>
            <category>General</category>
            <pubDate>Fri, 06 Feb 2009 02:53:23 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2962#msg-2962</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2962#msg-2962</link>
            <description><![CDATA[<p>Do you mean   or &lt;?</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>General</category>
            <pubDate>Thu, 05 Feb 2009 10:15:31 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2961#msg-2961</guid>
            <title>Re: Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2961#msg-2961</link>
            <description><![CDATA[<p>you should only be using html purifier for HTML not for normal text.</p>]]></description>
            <dc:creator>vaughan</dc:creator>
            <category>General</category>
            <pubDate>Thu, 05 Feb 2009 09:40:05 -0500</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?2,2960,2960#msg-2960</guid>
            <title>Advices for some allowed characters</title>
            <link>http://htmlpurifier.org/phorum/read.php?2,2960,2960#msg-2960</link>
            <description><![CDATA[<p>Hi guys,</p>

<p>I am currently working on a web application that uses HTML Purifier.
We created a class that altready filtered attacks from our forms but we wanted to add another tool more efficient. That's the reason why we recently installed your package of classes.</p>

<p>The problem is that there's a behaviour we would like to remove, the encoding of "some" characters.</p>

<p>Ex. we have a form with an input type="text". The customer wants to write "this is &lt; my text"
He validate is data by submitting.
Using you class to filter the data, when we want to display the data there's written: "this is &amp;nbsp; my text"</p>

<p>How can we control this behaviour? I notice that the encoding happened at this sentence:
$this-&gt;strategy-&gt;execute(  $lexer-&gt;tokenizeHTML( $html, $config, $context), $config, $context   )</p>

<p>We really don't know how to allows "&lt;" "&gt;" in the context of sentences, words...</p>

<p>If you could help us?</p>

<p>
Regards</p>

<p>Edited 1 time(s). Last edit at 02/05/2009 10:15AM by Ambush Commander.</p>]]></description>
            <dc:creator>laurent</dc:creator>
            <category>General</category>
            <pubDate>Thu, 05 Feb 2009 08:19:49 -0500</pubDate>
        </item>
    </channel>
</rss>
