From: Brenda Wallace Date: Mon, 20 Jul 2009 02:01:51 +0000 (+1200) Subject: look for full unicode when saving tags X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=711ade9835f3523dcf83702834adef313f9cf54d;p=quix0rs-gnu-social.git look for full unicode when saving tags --- diff --git a/classes/Notice.php b/classes/Notice.php index 101fadb674..12b47f3604 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -97,11 +97,11 @@ class Notice extends Memcached_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)#([\pL\pN_\-\.]{1,64})/', strtolower($this->content), $match); if (!$count) { return true; } - + /* Add them to the database */ foreach(array_unique($match[1]) as $hashtag) { /* elide characters we don't want in the tag */