I’m using drupal’s l() function to build a link. So I’m passing this variable as a second argument that the function will generate the href value from.
$performer = $row->node_field_data_field_evenement_performer_title;
$url = 'node/' . $row->node_field_data_field_evenement_performer_nid . '/lightbox2';
print l($performer, $url, array('html' => TRUE, 'attributes' => array('rel' => 'lightframe[group|width:500px; height: 500px]', 'class' => 'performer-link')));
The URL should end with the query string ?format=simple. So basically my $url variable should be updated something like:
$url = 'node/' . $row->node_field_data_field_evenement_performer_nid . '/lightbox2?format=simple';
No matter what encode/decode function I wrap around, and whatever escaping I do, that question mark and equals sign keep getting interpreted as %25 types of characters.
I tried:
$url = 'node/' . $row->node_field_data_field_evenement_performer_nid . '/lightbox2\?format\=simple');
or
'/lightbox2' . any_decode_or_encode_function_outthere('?format=simple');
but I keep getting URLs like node/202/lightbox2%5C%3Fformat%5C%3Dsimple.
Use the
querykey for the options array passed tol():l()callsurl()internally, and options can be forwarded on. See the docs forurl()