Welcome! » Log In » Create A New Profile

Trusted Input

Posted by jsuggs 
Trusted Input
December 22, 2008 11:08AM

I've got two usage scenarios.

One where I'm filtering input from end-users...so far this is working fantastically!

The other is where I am creating/editing (x)html myself. I "trust" this input, but I'm wanting to use htmlpurifier to essentially validate it to XHTML Strict. So, what is the easiest way to configure it to allow ALL tags (form, input, etc) and just do the validation.

Second question. Is there a way to have it auto-paragraph a single line?

Input: This is my input
Output: <p>This is my input</p>
Re: Trusted Input
December 22, 2008 11:44AM
The other is where I am creating/editing (x)html myself. I "trust" this input, but I'm wanting to use htmlpurifier to essentially validate it to XHTML Strict. So, what is the easiest way to configure it to allow ALL tags (form, input, etc) and just do the validation.

%HTML.Trusted. Unfortunately, not everything is implemented yet (in particular forms), so it's not going to be perfect. You may also want to look into tidy for your trusted input.

Second question. Is there a way to have it auto-paragraph a single line?

It should already.

Re: Trusted Input
June 23, 2009 01:47PM

&lt;blockquote cite=&quot;Ambush Commander&quot;&gt; &lt;p&gt;&lt;a href=&quot;/live/configdoc/plain.html#HTML.Trusted&quot;&gt;%HTML.Trusted&lt;/a&gt;. Unfortunately, not everything is implemented yet (in particular forms), so it's not going to be perfect. You may also want to look into tidy for your trusted input.&lt;/p&gt; &lt;/blockquote&gt;

Any news on allowing forms for trusted users? Is that part of 4.1?

Re: Trusted Input
June 23, 2009 11:36PM

Ostensibly. Forms have some hard problems, but it wouldn't be too difficult to get "basic" support hacked out. It will also be a lot nicer when we start using the HTML5 parsing algorithm, which would imply 5.0 or later.

Sorry, you do not have permission to post/reply in this forum.