[support] slight problem with encoding

Neil Coghlan neil at esl-lounge.com
Thu Apr 22 13:18:09 UTC 2010


no solutions for this?? I've tried everything I can think of...escaping the characters, wrapping them in all sorts of other characters, but no luck.
  ----- Original Message ----- 
  From: Neil Coghlan 
  To: support at drupal.org 
  Sent: Thursday, April 22, 2010 12:32 AM
  Subject: slight problem with encoding


  I have the following php snippet giving me a list of taxonomy terms for a certain vocab and certain content type. 

  <?php
  $vid = 4;
  $items = array();
  $type = manager;
  $terms = taxonomy_get_tree($vid);
  foreach ( $terms as $term ) { 
      $count = db_result(db_query("SELECT COUNT(term_node.nid) FROM {term_node} JOIN {node} ON node.nid = term_node.nid WHERE node.type = '%s' AND tid = %d", $type, $term->tid)); 
      $items[] = l($term->name, "personnel-search?type=$term->tid") . " ($count)";
  }
  if ( count($items) ) {  print theme('item_list', $items);}
  ?>

  the problem is in the bolded line, specifically the question mark and equal sign. I get a taxonomy list like this:

  retail (3)
  accounts (2)
  IT (1)

  when I hover over these, the links look perfect down in the status bar, but when I click on them, they come out in the URL bar as such:

  ...personnel-search%3Ftype%3D25

  and thus give me a 404. Is there an easy way of encoding it right?

  thanks

  Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100422/97d3e56c/attachment.html 


More information about the support mailing list