Welcome! » Log In » Create A New Profile

how does Core.CollectErrors operate

Posted by Pecos38 
how does Core.CollectErrors operate
July 12, 2017 01:16PM

hello

how directive Core.CollectErrors operate to display errors that occurred during purification like the demo?

exemple of html return (http://htmlpurifier.org/demo.php directive Core.CollectErrors is true)

Error Line 1, Column 0: Unrecognized <script> meta tag and all descendants removed

Error Line 1, Column 36: Unrecognized </script> meta tag and all descendants removed

Error Line 3, Column 0: href attribute on <a> removed

thank for the answer

Re: how does Core.CollectErrors operate
July 12, 2017 07:20PM

I tell people to look at the source code of demo.php. See http://repo.or.cz/htmlpurifier-web.git/blob/b4f116b5aebdc688e6e4b458d5a790add6282cd5:/demo.php

It's pretty simple.

Author:
Your Email:

Subject:

HTML input is enabled. Make sure you escape all HTML and angled brackets with &lt; and &gt;.

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: