Drupal 7: adding html (image) to view's exposed filters fields im having a little trouble theming the output of a view's exposed filter.

I have a node reference field, and in the exposed filter i want to show it as a checkbox list with, instead of the title of the referenced node, the image (that is a field, obvious).

Im doing the same thing for the node_edit form:

    // This function is called via #process fapi key
function _mytheme_theme_pittogrammi(&amp;$element)
{
    $lang = isset($element['it']) ? 'it' : 'und';

    foreach($element[$lang]['#options'] AS $nid =&gt; $label)
    {
        $pittogramma = node_load($nid);
        $image_field = _dwork_field_get_value($pittogramma-&gt;field_image);

        $image = '&lt;img class="bubbleUp" src="'
                . image_style_url('pittogrammi', $image_field[0]['uri']) . '" alt="'
                . $pittogramma-&gt;title .'" title="' . $pittogramma-&gt;title .'" /&gt;';

        $element[$lang]['#options'][$nid] = $image;


        $element[$lang][$nid] = array(
            '#label' =&gt; $image
        );
    }
    return $element;
}


and it works perfeclty; For the view_exposed_form i hat to make a little change in the function (becose the lang is not present), but is almost the same:

function _mymodule_theme_pittogrammi_view_form(&amp;$element)
{
    foreach($element['#options'] AS $nid =&gt; $label)
    {
        $pittogramma = node_load($nid);
        $image_field = _dwork_field_get_value($pittogramma-&gt;field_image);

        $image = '&lt;img class="bubbleUp" src="'
                . image_style_url('pittogrammi', $image_field[0]['uri']) . '" alt="'
                . $pittogramma-&gt;title .'" title="' . $pittogramma-&gt;title .'" /&gt;';

        $element['#options'][$nid] = $image;


        $element[$nid] = array(
            '#label' =&gt; $image
        );
    }
    return $element;
}


And this works somehow, but the problem is that the image HTML looks like is passed throught htmlspecialchars() or something like, and rendered as text.

Im wondering why and why only on view's exposed form...

How can i change this behavior?
Solved: I am using BEF module (Better Exposed Filters) that, in row 532 of better_exposed_filters.theme used to check_plain even the label.

Commenting that line do the trick, knowing that youre raping someone'else module (but this is the only way i found since there is no an option to dont check_plain the label)