mozilla & urlencode
| From: | John Taylor-Johnston | Date: | Sat, 04 Jun 2005 05:08:40 +0000 |
| Subject: | mozilla & urlencode | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-216356@lists.php.net to get a copy of this message | ||
I seem to have a problem with Mozilla or with IE?
echo "<a name=\"".urlencode($mydata->district)."\"></a>";
<a name="Montr%E9al+District+%234"></a>
http://foo.org/_private/directory.php#Montr%E9al+District+%234 works in IE6, but Mozilla will not accept it.
Mozilla does not work. Am I approaching this wrong? Should I create my HTML this way?
echo "<a name=\"".$mydata->district."\"></a>";
<a name="Montréal District #4"></a>
If I do, Mozilla prferes this:
http://foo.org/_private/directory.php#Montr%E9al%20District%20#4
or
http://foo.org/_private/directory.php#Montr%E9al%20District%20%234
IE refuses it and prefers:
http://foo.org/_private/directory.php#Montr%E9al+District+%234
What's my work around? Complain to Mozilla? Same for Firefox BTW. I cannot change my field.