$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`))