$linkText = common_linkify_mention($mention);
- $text = substr_replace($text, $linkText, $position, mb_strlen($mention['text']));
+ $text = substr_replace($text, $linkText, $position, $mention['length']);
}
return $text;
'type' => 'mention',
'text' => $match[0],
'position' => $match[1],
+ 'length' => mb_strlen($match[0]),
'url' => $url);
if (!empty($mentioned->fullname)) {
'type' => 'list',
'text' => $hmatch[0],
'position' => $hmatch[1],
+ 'length' => mb_strlen($hmatch[0]),
'url' => $url);
}
'type' => 'group',
'text' => $hmatch[0],
'position' => $hmatch[1],
+ 'length' => mb_strlen($hmatch[0]),
'url' => $group->permalink(),
'title' => $group->getFancyName());
}