Closed (duplicate)
Project:
Drupal core
Version:
4.6.4
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2005 at 00:39 UTC
Updated:
25 Aug 2010 at 15:16 UTC
I noticed this when attempting to view revisions of Drupal nodes after upgrading to 4.6.4
The & is now replaced with & so that the query string cannot be read.
I went crazy trying to figure out why, and the culprit apears to be the new version of the check_url function.
Any query string added to an URL by a module calling the l() function will now have the ampersand replaced by the html entity. I don't know about on your browsers (grin) but on mine, that doesn't work. The query string gets ignored.
The place that this is impacting me personally is that I can no longer look at revisions on a node without manually typing in the URL, in Drupal 4.6.4
Coyote
Comments
Comment #1
Coyote commentedSorry, the line : "The & is now replaced with & so that the query string cannot be read" should be:
The & is now replaced with & so that the query string cannot be read.Comment #2
markus_petrux commentedHi!
I have also found this problem with 4.6.4. It is because htmlspecialchars is executed twice so a single ampersand (as added by the function url()) gets transformed into & by check_url(), and transformed into & at the end of the new function filter_xss_bad_protocol() (added to filter.module).
See for yourself:
Note filter_xss_bad_protocol calls check_plain, which looks like this (in bootstrap.inc):
I believe it's probably wise now to simplify the function check_url() like this:
But that prolly depends on where the drupal devs wanted to go with the new changes.
Comment #3
markus_petrux commentedJust seen this reported and fixed here:
http://drupal.org/node/39566
:cool:
Comment #4
chx commentedComment #5
kenorb commentedfor core 5.x & 6.x #119025: l() appends the querystring with modified ampersand symbols