https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8de263d
)
update hashtag regular expression
author
root
<17hado.com@gmail.com>
Mon, 17 Dec 2018 05:33:03 +0000
(
05:33
+0000)
committer
Hypolite Petovan
<hypolite@mrpetovan.com>
Mon, 21 Jan 2019 14:12:35 +0000
(09:12 -0500)
include/api.php
patch
|
blob
|
history
diff --git
a/include/api.php
b/include/api.php
index
4bd9e34
..
4f4f1c5
100644
(file)
--- a/
include/api.php
+++ b/
include/api.php
@@
-1538,7
+1538,7
@@
function api_search($type)
$page = (!empty($_REQUEST['page']) ? $_REQUEST['page'] - 1 : 0);
$start = $page * $count;
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
- if (preg_match('/^
\#([^#]+)
/', $searchTerm, $matches) === 1 && isset($matches[1])) {
+ if (preg_match('/^
#(\w+)$
/', $searchTerm, $matches) === 1 && isset($matches[1])) {
$searchTerm = $matches[1];
$condition = ["`oid` > ?
AND (`uid` = 0 OR (`uid` = ? AND NOT `global`))