Welcome! » Log In » Create A New Profile

include path override?

Posted by smalyshev 
include path override?
October 31, 2012 05:21PM

I'm using HTMLPurifier.standalone.php and I see it does in its code this:

set_include_path(HTMLPURIFIER_PREFIX . PATH_SEPARATOR . get_include_path());

This puts purifier path at the beginning of the include path. However, this has bad effect inside a big application, since it means every time it includes a file, it looks in purifier directory first. Is this line really necessary? As far as I can see, files are loaded using HTMLPURIFIER_PREFIX anyway, so no reason to add anything to include path. Is there any reason to do it that I fail to see?

Re: include path override?
October 31, 2012 05:40PM

You might be able to get away without it; I haven't tested.

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: