Generate h1 et h2 inside link with theme function I am trying to modify a module.

I have two variables: let say $date = "mydate" and $title = "mytitle"

I have for the moment a theming function that creates a link by doing something like this:

$vars['row_dates'][$i] = l( $date, '', array('fragment' =&gt; $vars['timelinr_dates_id'] . '_' . $i, 'external' =&gt; TRUE));   


which output a result like:
    mydate

I would like now to output something like:

&lt;a href="..."&gt;
    &lt;h2&gt;mydate&lt;/h2&gt;
    &lt;h1&gt;mytitle&lt;/h1&gt;
&lt;/a&gt;


the problem is that if I do:

$date = "&lt;h2&gt;mydate&lt;/h2&gt;";
$title = "&lt;h1&gt;mytitle&lt;/h1&gt;"


then the markups are outputed like text
Is there a way to acheive it ?
You need to set the html-Option of l() to true:

l( $date, '', array(
  'fragment' =&gt; $vars['timelinr_dates_id'] . '_' . $i, 
  'external' =&gt; TRUE, 
  'html' =&gt; TRUE
)); 


Otherwise all html-tags get escaped by l().