Welcome! » Log In » Create A New Profile

htmLawed, another HTML filter-purifier

Posted by patnaik 
htmLawed, another HTML filter-purifier
November 02, 2007 07:00AM

Inspired by HTMLPurifier, I have released htmLawed, a light-weight HTML filter & purifier. It's a single-file, non-OOP script of ~45 kb with a basal peak memory usage of ~0.5 MB. htmLawed is highly and easily customizable, and can be used for HTML 4, or XHTML 1 or 1.1 documents.

Re: htmLawed, another HTML filter-purifier
November 03, 2007 12:44AM

See <a href="http://www.bioinformatics.org/phplabware/forum/viewtopic.php?id=24">this forum topic</a> for my comments on this new library. I will probably update the Comparison page with htmLawed.

It should be noted that this is basically "kses upgraded" / "kses on steroids".

Re: htmLawed, another HTML filter-purifier
November 03, 2007 07:22AM

In terms of what it can do, htmLawed is far beyond KSES. 'HTML Purifier's younger brother' may be a better annotation!

Re: htmLawed, another HTML filter-purifier
November 03, 2007 01:11PM

I agree that it's feature-set is far beyond KSES. However, it is derived from KSES and that's why I call it as such. :-) I'm sure you've rewritten most of the code.

Author:
Your Email:

Subject:

HTML input is enabled. Make sure you escape all HTML and angled brackets with < and >.

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: