How to specify a background image in a view so that it doesn't get removed? I want to output an image as a background-image of a "section"-tag but it doesn't work.

First I added the Image URL Formatter module, so I do not output the image but the url of the file.

In my view I add the image which generated with the contextual filter of the url. In that field I rewrite the output:

&lt;section style="background-image: url([field_hintergrundbild])" id="slid-unternehmen"&gt;
&lt;/section&gt;


When I check the site I only get this:

&lt;section id="slid-unternehmen"&gt; &lt;/section&gt;


I tried several times and it seems to me that Drupal will not accept the "style="..."" tag, Drupal will always remove it! And I don't know why?

If I change the style to class, I get the normal output, as in this example:

&lt;section class="background-image: url(http://....)" id="slid-unternehmen"&gt; &lt;/section&gt;


Does anybody have an idea?
To understand why this (= the style being removed) is happening, refer to this comment in the views issue queue:


  Rewrite uses filter_xss_admin and allows only the tags listed there.


It also includes a possible solution for it, which is like so:


  If you need more than this, then you need to use a template where you have complete control. This ensures that data entered via the UI is safe.


For an alternative solution (instead of using a template), you may want to consider the Background Images Formatter module. Here is an excerpt from its project page:


  This module provides an image formatter who allows you to set an image in background of a div. The images are from a field of an entity and not from a configuration page or sth else, so it's very easy to setup and manage.