title: Drupal: Creating anchor only link with l()
body: <p>I'd like to output this</p>
  
  <pre><code>&lt;a href='#namedanchor'&gt;link&lt;/a&gt;
  </code></pre>
  
  <p>using the l() function, so that the link just jumps to an anchor on the current page.</p>
  
  <p>I expected this to work </p>
  
  <pre><code>l('link', '',  array('fragment' =&gt; 'namedanchor'));
  </code></pre>
  
  <p>but it creates an absolute link to <code>www.example.com/#namedanchor</code> instead of <code>www.example.com/currentpage#namedanchor</code></p>