How to put links into description text? In my field's description, I want to link to more documentation. If I do it like this:

$form['field_name'] = array (
  '#description' =&gt; t('Here are some words about') . ' &lt;a href="http://mysite.com/blah"&gt;' . t('stuff') . '&lt;/a&gt; ' . t('and things and whatnot'),
);


It works. It looks like this:


  Here are some words about stuff and things and
  whatnot.


If I do it the proper way, like this:

$form['field_name'] = array (
  '#description' =&gt; t('Here are some words about @stuff and things and whatnot', array('@stuff' =&gt; l('stuff', 'blah')),
);


Then the HTML is generated and then output into my description as raw text, like so:


  Here are some words about &lt;a href="http://mysite.com/blah">stuff&lt;/a> and things and
  whatnot.


Why is the "correct" way not working?
Firstly, here are some of the ways NOT to pass links to the t() function:

// DO NOT DO THESE THINGS
$BAD_EXTERNAL_LINK = t('Look at Drupal documentation at !handbook.', array('!handbook' =&gt; '&lt;a href="http://drupal.org/handbooks"&gt;'. t('the Drupal Handbooks') .'&lt;/a&gt;'));

$ANOTHER_BAD_EXTERNAL_LINK = t('Look at Drupal documentation at &lt;a href="http://drupal.org/handbooks"&gt;the Drupal Handbooks&lt;/a&gt;.');

$BAD_INTERNAL_LINK = t('To get an overview of your administration options, go to !administer in the main menu.', array('!administer' =&gt; l(t('the Administer screen'), 'admin'));


And these are the accepted ways to pass that type of arg:

// Do this instead.
$external_link = t('Look at Drupal documentation at &lt;a href="@drupal-handbook"&gt;the Drupal Handbooks&lt;/a&gt;.', array('@drupal-handbook' =&gt; 'http://drupal.org/handbooks'));

$internal_link = t('To get an overview of your administration options, go to &lt;a href="@administer-page"&gt;the Administer screen&lt;/a&gt; in the main menu.', array('@administer-page' =&gt; url('admin')));


This all comes from Dynamic or static links and HTML in translatable strings, which contains justifications for that reasoning.