summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/title.module1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/title.module b/modules/title.module
index e23031aa4..fd02de0c7 100644
--- a/modules/title.module
+++ b/modules/title.module
@@ -26,6 +26,7 @@ function title_page() {
$title = urldecode(arg(1));
$result = db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title = '%s' AND n.status = 1 ORDER BY n.created DESC", $title);
+ $title = trim(str_replace(array('_', '%', '*'), ' ', $title));
if (db_num_rows($result) == 0) {
// No node with exact title found, try substring.
$result = db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title LIKE '%%%s%%' AND n.status = 1 ORDER BY n.created DESC", $title);