aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-24 19:25:47 -0800
committerFriendika <info@friendika.com>2010-11-24 19:25:47 -0800
commit9d7130e40382c316f5430ace4b9ca16a998a7432 (patch)
tree691dfc2d881b20f14784bc889b8e4d02dc99aa58 /mod
parentd855371fa5509506a85a150b3edb56277e1212e0 (diff)
downloadvolse-hubzilla-9d7130e40382c316f5430ace4b9ca16a998a7432.tar.gz
volse-hubzilla-9d7130e40382c316f5430ace4b9ca16a998a7432.tar.bz2
volse-hubzilla-9d7130e40382c316f5430ace4b9ca16a998a7432.zip
tag search boolean mode
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php6
-rw-r--r--mod/search.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/mod/item.php b/mod/item.php
index 4b95f2d9b..77fdd4a21 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -122,11 +122,11 @@ function item_post(&$a) {
if(count($tags)) {
foreach($tags as $tag) {
if(strpos($tag,'#') === 0) {
- $basetag = substr($tag,1);
- $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . urlencode($basetag) . ']' . $basetag . '[/url]',$body);
+ $basetag = str_replace('_',' ',substr($tag,1));
+ $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
if(strlen($str_tags))
$str_tags .= ',';
- $str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . urlencode($basetag) . ']' . $basetag . '[/url]';
+ $str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
continue;
}
if(strpos($tag,'@') === 0) {
diff --git a/mod/search.php b/mod/search.php
index 19bf6b964..78a4a3d53 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -7,7 +7,7 @@ function search_content(&$a) {
$o .= '<h3>' . t('Search') . '</h3>';
- $search = ((x($_GET,'search')) ? $_GET['search'] : '');
+ $search = ((x($_GET,'search')) ? rawurldecode($_GET['search']) : '');
$o .= search($search);