Commit 2923f6ca authored by John C. Fiala's avatar John C. Fiala
Browse files

Issue #1710578 by jcfiala: Added code to prevent unnecessary = signs in querystrings.

parent 34adaa38
......@@ -456,6 +456,12 @@ function _link_sanitize(&$item, $delta, &$field, $instance, &$node) {
if (strpos($url, '?') !== FALSE) {
$query = substr($url, strpos($url, '?') + 1);
parse_str($query, $query_array);
// See http://drupal.org/node/1710578
foreach ($query_array as $key=> &$value) {
if ($value === '' && FALSE === strpos($query, $key . '=')) {
$value = NULL;
}
}
$url_parts['query'] = $query_array;
$url = substr($url, 0, strpos($url, '?'));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment