diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 7 | ||||
-rw-r--r-- | includes/locale.inc | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/includes/common.inc b/includes/common.inc index 22b93767a..cf194cbc5 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -963,6 +963,7 @@ function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) { } $path = drupal_get_path_alias($path); + $path = drupal_urlencode($path); if (isset($fragment)) { $fragment = '#'. $fragment; @@ -1251,13 +1252,15 @@ function drupal_implode_autocomplete($array) { /** * Wrapper around urlencode() which avoids Apache quirks. * - * Should be used when placing arbitrary data inside the path of a clean URL. + * Should be used when placing arbitrary data in an URL. Note that Drupal paths + * are urlencoded() when passed through url() and do not require urlencoding() + * of individual components. * * @param $text * String to encode */ function drupal_urlencode($text) { - return variable_get('clean_url', '0') ? str_replace('%2F', '/', urlencode($text)) : urlencode($text); + return str_replace('%2F', '/', urlencode($text)); } /** diff --git a/includes/locale.inc b/includes/locale.inc index 2f986820d..c817e8673 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -74,7 +74,7 @@ function theme__locale_admin_manage_screen($form) { foreach ($form['name'] as $key => $element) { // Don't take form control structures if (is_array($element) && element_child($key)) { - $rows[] = array(check_plain($key), form_render($form['name'][$key]), form_render($form['enabled'][$key]), form_render($form['sitedefault'][$key]), ($key != 'en' ? form_render($form['translation'][$key]) : message_na()), ($key != 'en' ? l(t('delete'), 'admin/locale/language/delete/'. drupal_urlencode($key)) : '')); + $rows[] = array(check_plain($key), form_render($form['name'][$key]), form_render($form['enabled'][$key]), form_render($form['sitedefault'][$key]), ($key != 'en' ? form_render($form['translation'][$key]) : message_na()), ($key != 'en' ? l(t('delete'), 'admin/locale/language/delete/'. $key) : '')); } } $header = array(array('data' => t('Code')), array('data' => t('English name')), array('data' => t('Enabled')), array('data' => t('Default')), array('data' => t('Translated')), array('data' => t('Operations'))); |