<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>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.</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=neil@esl-lounge.com href="mailto:neil@esl-lounge.com">Neil
Coghlan</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=support@drupal.org
href="mailto:support@drupal.org">support@drupal.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, April 22, 2010 12:32
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> slight problem with
encoding</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>I have the following php snippet giving me a list
of taxonomy terms for a certain vocab and certain content type. </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><?php<BR>$vid = 4;<BR>$items =
array();<BR>$type = manager;<BR>$terms = taxonomy_get_tree($vid);<BR>foreach (
$terms as $term ) { <BR> $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));
<BR><STRONG> $items[] = l($term->name,
"personnel-search?type=$term->tid") . " ($count)";<BR></STRONG>}<BR>if (
count($items) ) { print theme('item_list',
$items);}<BR>?></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>the problem is in the bolded line, specifically
the question mark and equal sign. I get a taxonomy list like
this:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>retail (3)</FONT></DIV>
<DIV><FONT size=2 face=Arial>accounts (2)</FONT></DIV>
<DIV><FONT size=2 face=Arial>IT (1)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>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:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>...personnel-search</FONT><FONT size=2
face=Arial><STRONG>%3F</STRONG>type<STRONG>%3D</STRONG>25</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>and thus give me a 404. Is there an easy way of
encoding it right?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>thanks<BR><BR>Neil</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></BLOCKQUOTE></BODY></HTML>