Programmatically render HTML in taxonomy term description I'm facing an issue where I'm attempting to programmatically set the description property for a taxonomy term that includes HTML, but the HTML is being rendered as text, rather than being rendered into HTML elements, unless I manually access the term in a browser and save it.

Example

taxonomy_term_save((object)array(
  'name' =&gt; $name,
  'description' =&gt; $t('&lt;h5&gt;My description.&lt;/h5&gt;&lt;p&gt;More info.&lt;/p&gt;'),
  'vid' =&gt; $vocab-&gt;vid,
));


When I attempt to render the description, it appears as:


  &lt;h5&gt;My description.&lt;/h5&gt;&lt;p&gt;More info.&lt;/p&gt;


However, if I then go to Structure > Taxonomy > My_Vocabulary > My_Term and simply save the term (without any edits), it will then render properly as:


  My description.More info.


I've also made a number of attempts to achieve this through an Entity Metadata Wrapper, but no luck (though I am admittedly not well versed on EMWs).

How can I programmatically force the description to correctly render the HTML without having to manually re-save it?

Any help is appreciated!
The taxonomy_term_data table, which is the entity table for taxonomy terms, has a format column which stores the name of a filter to apply to the description when rendered.

It's available as a property on the entity, so you can use:

taxonomy_term_save((object)array(
  'name' =&gt; $name,
  'description' =&gt; $t('&lt;h5&gt;My description.&lt;/h5&gt;&lt;p&gt;More info.&lt;/p&gt;'),
  'vid' =&gt; $vocab-&gt;vid,
  'format' =&gt; 'full_html',
));