aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Search.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-10 18:05:26 +0000
committerMario <mario@mariovavti.com>2022-10-10 18:05:26 +0000
commitef2448e17e742e7dcef458993bce1e0a29756aa7 (patch)
treed23c62753abbb42e7bb742f2d44d09321b6f2eee /Zotlabs/Module/Search.php
parent6ab65519a0fc3e55ad5f32ce1641190ef609a4e2 (diff)
parent99a5cf1ad4660a31af6c03e5a1abc3d374f82c78 (diff)
downloadvolse-hubzilla-ef2448e17e742e7dcef458993bce1e0a29756aa7.tar.gz
volse-hubzilla-ef2448e17e742e7dcef458993bce1e0a29756aa7.tar.bz2
volse-hubzilla-ef2448e17e742e7dcef458993bce1e0a29756aa7.zip
Merge branch '7.8RC'7.8
Diffstat (limited to 'Zotlabs/Module/Search.php')
-rw-r--r--Zotlabs/Module/Search.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index efea7bbdd..da4752186 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -59,15 +59,18 @@ class Search extends Controller {
$o .= search($search, 'search-box', '/search', ((local_channel()) ? true : false));
if (local_channel() && strpos($search, 'https://') === 0 && !$update && !$load) {
- if (strpos($search, 'b64.') !== false) {
- if (strpos($search, '?') !== false) {
- $search = strtok($search, '?');
+
+ $url = htmlspecialchars_decode($search);
+
+ if (strpos($url, 'b64.') !== false) {
+ if (strpos($url, '?') !== false) {
+ $url = strtok($url, '?');
}
- $search = unpack_link_id(basename($search));
+ $url = unpack_link_id(basename($url));
}
- $f = Libzot::fetch_conversation(App::get_channel(), punify($search), true);
+ $f = Libzot::fetch_conversation(App::get_channel(), punify($url), true);
if ($f) {
$mid = $f[0]['message_id'];
@@ -83,7 +86,7 @@ class Search extends Controller {
else {
// try other fetch providers (e.g. diaspora, pubcrawl)
$hookdata = [
- 'url' => punify($search)
+ 'url' => punify($url)
];
call_hooks('fetch_provider', $hookdata);
}