diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-10-21 11:14:55 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-10-21 11:14:55 +0000 |
commit | f31db8d70f08a29bac6b98049c138344d37b75ea (patch) | |
tree | 4bf48f76d5b43124edfc47ac41717eba6ae65ea1 /includes/common.inc | |
parent | 6777fdb193fb9db01243082b4181ef7637c4ac91 (diff) | |
download | brdo-f31db8d70f08a29bac6b98049c138344d37b75ea.tar.gz brdo-f31db8d70f08a29bac6b98049c138344d37b75ea.tar.bz2 |
- #22850: Search query containing / results in 404 on clean URLs.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index dc7a41afd..953339300 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1296,6 +1296,18 @@ 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. + * + * @param $text + * String to encode + */ +function drupal_urlencode($text) { + return variable_get('clean_url', '0') ? str_replace('%2F', '/', urlencode($text)) : urlencode($text); +} + +/** * Performs one or more XML-RPC request(s). * * @param $url |