How do I handle special characters? I use the Display Suite module and I enabled the Display Suite Format module. I use a code field to display a node/edit link, with the following code:

  if (node_access('update', $entity)) {
    print l(t('Modifier'), 'node/' . $entity-&gt;nid . '/edit?nid=' . [node:field-construction-fdr-ref:nid]);
  }
?&gt;


The resulting URL is http://localhost/node/11430/edit%3Fnid%3D11419, leading to a Page not found error. I wish to get http://localhost/node/11430/edit?nid=11419.

I tried / before ? and =; I tried &amp;_#63; for ? and &amp;_#61; for =.

How can I get the URL I need?
Query params should be passed to the function in a keyed array:

$query = array(
  'nid' =&gt; 123,
  'foo' =&gt; 'bar',
);
$params = array('query' =&gt; $query);

print l(t('Modifier'), 'node/' . $entity-&gt;nid . '/edit', $params);