Welcome! » Log In » Create A New Profile

How to allow display attribute?

Posted by Chris1904 
How to allow display attribute?
March 16, 2017 10:51PM

Hi!

I get the following error message when trying to use the display attribute:

ErrorException in CSSDefinition.php line 472:
Style attribute 'display' is not supported (for information on implementing this, see the support forums)
in CSSDefinition.php line 472
at HandleExceptions->handleError(512, 'Style attribute \'display\' is not supported (for information on implementing this, see the support forums) ', '/code/project/vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php', 472, array('config' => object(HTMLPurifier_Config), 'support' => '(for information on implementing this, see the support forums) ', 'allowed_properties' => array('display' => true), 'd' => true, 'name' => 'display'))
at trigger_error('Style attribute \'display\' is not supported (for information on implementing this, see the support forums) ', 512) in CSSDefinition.php line 472

Is there any way I could use the display attribute? It is for centering images. Why is it not enabled by default?

Thanks!

edit: figured it out myself: used CSS.AllowTricky

Edited 1 time(s). Last edit at 03/16/2017 10:55PM by Chris1904.

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: