diff --git a/api/src/Etemplate/Widget/Nextmatch.php b/api/src/Etemplate/Widget/Nextmatch.php index c49a3d9b7b..079a900d59 100644 --- a/api/src/Etemplate/Widget/Nextmatch.php +++ b/api/src/Etemplate/Widget/Nextmatch.php @@ -336,7 +336,7 @@ class Nextmatch extends Etemplate\Widget // Parse sort into something that get_rows functions are expecting: db_field in order, ASC/DESC in sort if(is_array($value['sort'])) { - $value['order'] = preg_match('/^[a-z0-9_]+$/', $value['sort']['id']) ? $value['sort']['id'] : ''; + $value['order'] = preg_match('/^(#[a-z0-9 _]+|[a-z0-9_]+)$/i', $value['sort']['id']) ? $value['sort']['id'] : ''; $value['sort'] = $value['sort']['asc'] ? 'ASC' : 'DESC'; }