Closed (fixed)
Project:
Drupal core
Component:
taxonomy.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Nov 2004 at 00:33 UTC
Updated:
1 Apr 2005 at 09:15 UTC
Jump to comment: Most recent file
for example, on page:
http://drupal.org/taxonomy/term/1+2
you get an RSS url with a space in it
http://drupal.org/taxonomy/term/1 2/0/feed
if you have a smart browser, it inserts %20 between 1 and 2, but maybe some browsers and RSS bots are not so smart.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 04_taxorss.patch | 1.58 KB | morbus iff |
Comments
Comment #1
morbus iffTheoretically, a browser should ALWAYS see the space as %20 when it comes to a URL - that's just part of the HTTP spec (URL encoding, blah blah blah). The underlying code of taxonomy_term_page also supports a space as an "or" delimiter, and comments on it as well ("The '+' character in a query string may be parsed as ' '."). With that said, the plus-to-space conversion is happening BEFORE taxonomy_term_page (where the RSS URLs are written). This appears to be a normal part of the menu callback code (in this particular case, the menu code appears to be passing the remaining parts of the URL, unencoded [as it should], to the taxonomy_term_page function.
If we really wanted the RSS URLs to be written with the space, we'd need to do a re-conversion inside taxonomy_term_page. I've included a patch to do so, using an innocent urlencode on the space-separated $str_tids, turning it into a plus-separated $rss_tids.
Comment #2
Steven commentedThe conversion from + to space is in fact done by PHP, not by the menu system. The clean URL gets rewritten to ?q=1+2, which is interpreted as '1 2'. If you need a + in a GET query, you need to use a %XX escape.
Applied to HEAD, but I did modify the comment on the urlencode line.
To:
Referring to issues is a bit unnecessary: when I modify the code later, I want to know how it is now, not how it was before.
Comment #3
(not verified) commented