look for full unicode when saving tags
This commit is contained in:
parent
6b7fa65ca1
commit
711ade9835
@ -97,11 +97,11 @@ class Notice extends Memcached_DataObject
|
|||||||
function saveTags()
|
function saveTags()
|
||||||
{
|
{
|
||||||
/* extract all #hastags */
|
/* 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) {
|
if (!$count) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add them to the database */
|
/* Add them to the database */
|
||||||
foreach(array_unique($match[1]) as $hashtag) {
|
foreach(array_unique($match[1]) as $hashtag) {
|
||||||
/* elide characters we don't want in the tag */
|
/* elide characters we don't want in the tag */
|
||||||
|
Loading…
Reference in New Issue
Block a user