How to set HTML value for taxonomy description field using entity_metadata_wrapper I've set my taxonomy description field to taking a filtered text value. Using the UI, I can edit a taxonomy term, write some HTML, save, and when I view it I see the HTML rendered by my browser.

However when doing this:

$wrapper = entity_metadata_wrapper('taxonomy_term', 123);
$wrapper-&gt;description-&gt;set('&lt;p&gt;My html&lt;/p&gt;');
$wrapper-&gt;save();


And viewing the term's page, the description comes out with the html converted to entities, i.e. I see &lt;p&gt;My html&lt;/p&gt; instead of a paragraph with My html as its content.

I notice that

$wrapper-&gt;description-&gt;value(); // &lt;p&gt;&amp;lt;p&amp;gtp;My html&amp;lt;p&amp;gt;&lt;/p&gt;


Whereas if I load a term that I have edited with the UI, saving HTML to the description field, 

$wrapper-&gt;description-&gt;value(); // &lt;p&gt;Some html&lt;/p&gt;


I've looked at $wrapper-&gt;description and $wrapper-&gt;value()-&gt;description and there's no difference between a term with/without the correct/desired behaviour.

Also, I note that with normal fields, when you set a formatted text field you pass/get an array [ 'format' =&gt; 'filtered', 'value' =&gt; '&lt;p&gt;the html&lt;/p&gt;' ] whereas here I only ever get a string.

Is this something peculiar to taxonomy terms (and is there a workaround or extra code I need)? Have I misunderstood something?

Thanks.
I just encountered a similar situation myself and it looks like you're choices are either taxonomy_term_save() or to update the table directly via  db_update(). The format property belongs to the term itself, rather than the Description property of the term. If you execute $term-&gt;getPropertyInfo() you'll see that the format property is not returned. Keep in mind that the Description is a property of the taxonomy entity, rather than a field, but doesn't seem to be accessible via EMW.

taxonomy_term_save()

taxonomy_term_save((object)array(
  'tid' =&gt; $tid,
  'description' =&gt; $t($descriptions[$info['step']]),
  'format' =&gt; 'full_html',
  'vid' =&gt; $vocab-&gt;vid,
));