summaryrefslogtreecommitdiff
path: root/modules/search
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-11-23 06:00:27 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-11-23 06:00:27 +0000
commit6cacff4b4e4494c05f90604849dc8803c7506ae0 (patch)
tree8798ed29de067d35d5a7158eb2a718c817ddd362 /modules/search
parente19a50d23f2942b4a22c69e5d2e57a1c02f682f8 (diff)
downloadbrdo-6cacff4b4e4494c05f90604849dc8803c7506ae0.tar.gz
brdo-6cacff4b4e4494c05f90604849dc8803c7506ae0.tar.bz2
#298561 by Steven, chx, mcarbone, pwolanin: Fixed slashes don't work in search
Diffstat (limited to 'modules/search')
-rw-r--r--modules/search/search.module1
-rw-r--r--modules/search/search.test7
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/search/search.module b/modules/search/search.module
index d6e6350ae..1f4238797 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -210,6 +210,7 @@ function search_menu() {
);
$items["$path/%menu_tail"] = array(
'title' => $search_info['title'],
+ 'load arguments' => array('%map', '%index'),
'page callback' => 'search_view',
'page arguments' => array($module, 2),
'access callback' => '_search_menu_access',
diff --git a/modules/search/search.test b/modules/search/search.test
index 35f363a67..78c3cfae2 100644
--- a/modules/search/search.test
+++ b/modules/search/search.test
@@ -279,6 +279,13 @@ class SearchPageText extends DrupalWebTestCase {
$this->drupalPost('search/user', $edit, t('Search'));
$this->assertText(t('Search'));
$this->assertTitle($title, 'Search page title is correct');
+
+ // Test that search keywords containing slashes are correctly loaded
+ // from the path and displayed in the search form.
+ $arg = $this->randomName() . '/' . $this->randomName();
+ $this->drupalGet('search/node/' . $arg);
+ $input = $this->xpath("//input[@id='edit-keys' and @value='{$arg}']");
+ $this->assertFalse(empty($input), 'Search keys with a / are correctly set as the default value in the search box.');
}
}