Could not find this issue reported yet so I report it. If duplicate, please mark as such.

I am using contemplate in order to find the name of a variable so I can retrieve the its associated value within a tpl file. This works fine both with check_plain($node->somefield['value']) and with $node->somefield['safe'].

However, when using the single checkbox option in text field, the 'safe' mode always returns empty in runtime, no matter what the actual value is. This is en contraire what is seen using contemplae - there, the 'safe' value is retrieved correctly.

In contemplae:

    $node->field_hide_powered_by[0]['value'] **
        yes 
    $node->field_hide_powered_by[0]['safe']
        yes 

This works:

	<?php if (check_plain($node->field_hide_powered_by[0]['value']) != 'yes' ) :?>

This does not work:

	<?php if ($node->field_hide_powered_by[0]['safe'] != 'yes' ) :?>

Amir