I need to create a link in the _block() view area of my module. The problem is that my link contains equal signs = and ampersands &. Drupal outputs them wrong on the page, they come as %26 for &, and %3D for =

This makes the links nonfunctional, please help!!!!!

Here's my code:


$block['content'] .= l("Click", "admin/content/nodequeue/"."2"."/add/"."2"."/".$node->nid."&"."destination=node/".$node->nid."&".$thistoken);

Please help, I'm stuck, and I bet the solution is simple, but I guess I'm simpler.

Comments

ckng’s picture

Pass it in as options parameter of the l()

<?php
$options = array('query' => array('destination' => 'node/'.$node->nid, 'token' => $thistoken));
$block['content'] .= l(t('Click'), 'admin/content/nodequeue/2/add/2/'.$node->nid, $options);
?>

http://api.drupal.org/api/function/l/6

--
CK Ng | myFineJob.com

sdutcher’s picture

THANK YOU!!!!!!!!!!!!!

I'm putting your user name in a comment!