werushka Posted April 28, 2009 Share Posted April 28, 2009 I have code like this <?php if (!(arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'ilan' && arg(3) == '?' && arg(4) == 'destination' && arg(5) == '=' && arg(6) == 'frontpage')) { print "<div id='ilan'>". l('İLAN VER !', "node/add/ilan?destination=frontpage") ."</div>"; } ?> well this is causing me some problems and breaking the link. The link shows as node/add/ilan%3Fdestination%3Dfrontpage. The "?" and "=" is replaced by %3D and %3F. How can I fix this error. I would really appreciate some feedback. Thanks Link to comment https://forums.phpfreaks.com/topic/155932-in-browser-address-bar-the-and-replaced-by-3d-and-3f/ Share on other sites More sharing options...
ILMV Posted April 28, 2009 Share Posted April 28, 2009 What is the function l(); ? Can you post the code for this? Link to comment https://forums.phpfreaks.com/topic/155932-in-browser-address-bar-the-and-replaced-by-3d-and-3f/#findComment-820915 Share on other sites More sharing options...
werushka Posted April 28, 2009 Author Share Posted April 28, 2009 sorry for the late reply <?php function l($text, $path, $options = array()) { global $language; // Merge in defaults. $options += array( 'attributes' => array(), 'html' => FALSE, ); // Append active class. if (($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) && (empty($options['language']) || $options['language']->language == $language->language)) { if (isset($options['attributes']['class'])) { $options['attributes']['class'] .= ' active'; } else { $options['attributes']['class'] = 'active'; } } // Remove all HTML and PHP tags from a tooltip. For best performance, we act only // if a quick strpos() pre-check gave a suspicion (because strip_tags() is expensive). if (isset($options['attributes']['title']) && strpos($options['attributes']['title'], '<') !== FALSE) { $options['attributes']['title'] = strip_tags($options['attributes']['title']); } return '<a href="'. check_url(url($path, $options)) .'"'. drupal_attributes($options['attributes']) .'>'. ($options['html'] ? $text : check_plain($text)) .'</a>'; } ?> Link to comment https://forums.phpfreaks.com/topic/155932-in-browser-address-bar-the-and-replaced-by-3d-and-3f/#findComment-821329 Share on other sites More sharing options...
redarrow Posted April 28, 2009 Share Posted April 28, 2009 try this. keep this as a reference to special characters for html. http://www.degraeve.com/reference/specialcharacters.php <?php if (!(arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'ilan' && arg(3) == '?' && arg(4) == 'destination' && arg(5) == '=' && arg(6) == 'frontpage')) { print "<div id='ilan'>". l('İLAN VER !', "node/add/ilan?destination=frontpage") ."</div>"; } ?> Link to comment https://forums.phpfreaks.com/topic/155932-in-browser-address-bar-the-and-replaced-by-3d-and-3f/#findComment-821369 Share on other sites More sharing options...
werushka Posted April 28, 2009 Author Share Posted April 28, 2009 thanks for the fast reply actually that spacial charaters is a problem generated when posting here. There is no special characters. Your code is the same as mine. <?php if (!(arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'ilan' && arg(3) == '?' && arg(4) == 'destination' && arg(5) == '=' && arg(6) == 'frontpage')) { print "<div id='ilan'>". l('ilan ver !', "node/add/ilan?destination=frontpage") ."</div>"; } ?> Link to comment https://forums.phpfreaks.com/topic/155932-in-browser-address-bar-the-and-replaced-by-3d-and-3f/#findComment-821402 Share on other sites More sharing options...
werushka Posted April 29, 2009 Author Share Posted April 29, 2009 I have tried with the special charaters thing and this does not seem to work. Link to comment https://forums.phpfreaks.com/topic/155932-in-browser-address-bar-the-and-replaced-by-3d-and-3f/#findComment-822142 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.