|
PHP Warnings when set HTML.Allowed parameter February 07, 2012 05:52AM |
Registered: 1 year ago Posts: 1 |
When I set up the HTML.Allowed configuration I get PHP Warnings. I guess I'm not setting well the allowed parameters... Here is the code I'm using:
$allowed = 'b,strong,i,em,u,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src],';
$allowed .= 'object[align<bottom?left?middle?right?top|archive|border|class|classid|codebase|codetype|data|';
$allowed .= 'declare|dir<ltr?rtl|height|hspace|id|lang|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|';
$allowed .= 'onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap|vspace|width]';
self::$config->set('HTML.Allowed', $allowed);
Warning: Attribute 'align<bottom?left?middle?right?top' in element 'object' not supported (for information on implementing this, see the support forums) in {install}/oc-includes/htmlpurifier/HTMLPurifier/HTMLDefinition.php on line 324
Warning: Attribute 'archive' in element 'object' not supported (for information on implementing this, see the support forums) in {install}/oc-includes/htmlpurifier/HTMLPurifier/HTMLDefinition.php on line 324
You can see the whole PHP Warnings here: http://forums.osclass.org/installation-update-help/warnings-from-2-3-5/msg21081/#msg21081 The original file with the HTMLPurifier implementation is here: https://github.com/osclass/OSClass/blob/hotfixes/oc-includes/osclass/core/Params.php
I'm stuck with this because not everyone see the warning errors... :(
|
Re: PHP Warnings when set HTML.Allowed parameter February 07, 2012 10:46AM |
Admin Registered: 6 years ago Posts: 2,632 |
The syntax for allowed parameters doesn't support the angled-bracket question mark syntax; that is all handled by HTML Purifier.
For objects, look at %HTML.SafeObject