When parsing a URL query string such as var1=value&var2=a=b where var2 should be equal to a=b the current code would create an array var2[0] = a and var2[1] = b. My proposal is to add a limit of 1, rather than 2 like in the dev branch, to the explode to ensure that any ='s in the value itself will be accepted.

Will submit patch when I have an issue number

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

brandonmoore’s picture

brandonmoore’s picture

FileSize
470 bytes
brandonmoore’s picture

Status: Patch (to be ported) » Needs review
brandonmoore’s picture

Assigned: brandonmoore » Unassigned
jcfiala’s picture

Status: Needs review » Closed (works as designed)

'explode' doesn't work the way you seem to think it does. explode("=", "this=that", 2) produces an array where item 0 is "this" and item 1 is "that". explode("=", "this=that", 1) produces an array with one item that contains "this=that". This is pretty clear from using drush:

drush php-eval 'drush_print_r(explode("=", "this=that", 2));'

and

drush php-eval 'drush_print_r(explode("=", "this=that", 1));'

The code as it exists is what is needed.