summaryrefslogtreecommitdiff
path: root/modules/path.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/path.module')
-rw-r--r--modules/path.module2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/path.module b/modules/path.module
index cce40f470..d93ca5cef 100644
--- a/modules/path.module
+++ b/modules/path.module
@@ -144,7 +144,9 @@ function path_set_alias($path = NULL, $alias = NULL, $pid = NULL) {
drupal_clear_path_cache();
}
else if ($path && $alias) {
+ $path = urldecode($path);
$path_count = db_result(db_query("SELECT COUNT(src) FROM {url_alias} WHERE src = '%s'", $path));
+ $alias = urldecode($alias);
$alias_count = db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s'", $alias));
// We have an insert: