Welcome! » Log In » Create A New Profile

allowing inline css style background-image: url()

Posted by Frumentius 
allowing inline css style background-image: url()
February 24, 2018 09:32AM

how do i enable background-image css inline style?

I've set these config, but still doesn't work;

$config->set('Core.Encoding', 'UTF-8');

$config->set('HTML.Doctype', 'HTML 4.01 Transitional');

$config->set('URI.AllowedSchemes', array('http' => true, 'https' => true));

$config->set('CSS.Proprietary', true);

$config->set('CSS.Trusted', true);

$config->set('CSS.AllowedProperties', array('background-image'));


from this input for example:

<div style="background-image: url('https://somedomain.com/image.jpg');"></div>


the result always like this:

<div style="background-image: url(;"></div>


what did I miss??

Your Email:


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:

Place code here

Power users, you can hide this notice with:

.htmlpurifier-help {display:none;}