Welcome! » Log In » Create A New Profile

integrating standalong into zendframework2

integrating standalong into zendframework2
January 16, 2015 11:52AM

I am currently integrating with a zfw2 variants and am using the standalone install and thought I'd post this as it may be useful for somebody else. I may return with questions.

I placed the files under src/vendor/HTMLPurifier and added to composer.json the following lines:

"autoload": { "classmap": ["vendor/HTMLPurifier/HTMLPurifier.standalone.php"] },

Composer generates a working classmap file.

I verified that purifier can be reference in within the runtime.

I am keen to set the cache directory in a clean way so I can use purify in a form filter. I think the right way to have done this by adding an entry for the cache path to module.config, and the configuring the filter with the cache pathname as the form is created. (this is zend internals, but again this is FYI).

I am curious if there is any efficiency to be gained by serializing the rather stable configuration, over creating and modifying the default.

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: