php - Drupal changing links
I'm using Drupal's Forms API in my module, and I'm attempting to output a link as part of some markup:
//$output = l('Result', 'document/1234'); $output = '<a href="document/1234">Result</a>'; $form['results'] = array( '#type' => 'markup', '#markup' => $output, )
I've tried use both a simple string and the l() function and in both cases when the page is rendered, the link does not work, and when I inspect the element, it is mangled like this:
<a href=" 1234"="" document="">
and the closing tag is missing.
So far as I can see I'm not doing any post-processing of any kind on the markup before it is rendered.
In other places in my module I have created links like this and they are output normally.