summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 5e1f83a52..06750b436 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -54,10 +54,13 @@ class Notice extends DB_DataObject
function saveTags() {
/* extract all #hastags */
- $count = preg_match_all('/(?:^|\s)#([A-Za-z0-9]{1,64})/', strtolower($this->content), $match);
+ $count = preg_match_all('/(?:^|\s)#([A-Za-z0-9_\-\.]{1,64})/', strtolower($this->content), $match);
if (!$count) {
return true;
}
+
+ /* elide characters we don't want in the tag */
+ $match[1] = str_replace(array('-', '_', '.'), '', $match[1]);
/* Add them to the database */
foreach(array_unique($match[1]) as $hashtag) {