Closed (fixed)
Project:
Printer, email and PDF versions
Version:
5.x-3.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jul 2008 at 20:55 UTC
Updated:
1 Sep 2008 at 13:31 UTC
I have a page that's generated by a URL query with a "%26" in place of an ampersand. When the user clicks the "Printer-friendly version" link, they receive a blank page because the "%26" gets re-interpreted as "%2526" due to the drupal_urlencode() function that's called by the drupal_query_string_encode() function in line 341 of the print.module file.
Is there anyway this section of code can be re-written so that this "encoding of the encoded" doesn't happen?
Many thanks!
Comments
Comment #1
jcnventuraHi,
I have just committed the code that fixes this. It will be in the dev version soon.
João
Comment #2
chill5-0 commentedMany thanks!
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
fonant commentedI'm interested in this too, where I have user-submitted search data that appears in a query string, rather than in the main URL path (with clean URLs on).
The query string part of the URL should not use drupal_urlencode() as the double-encoding isn't needed to work around mod_rewrite's decoding of the main part of the URL. This function only appears to be called to encode the query-string part, never the entire URL.
Looks like this might have been broken way back in 2006: http://drupal.org/node/74070
Changing the call drupal_urlencode($value) to rawurlencode($value) towards the end of the drupal_query_string_encode() function works for me.
Comment #5
fonant commentedComment #6
jcnventura