quick & dirty workaround to avoid messing with @ in urls

This commit is contained in:
n 2021-07-29 18:56:46 +02:00
parent 74e7d3e60f
commit 298df239e2
Signed by: n
GPG Key ID: E96086FC951DAE30
1 changed files with 2 additions and 2 deletions

View File

@ -13,8 +13,8 @@ function hook_clickat_render_linklist($data)
{
foreach ($data['links'] as &$value) {
$value['description'] = preg_replace('/@([\w\d]+)@([\w\d_\.]+)/','<a href="https://\2/users/\1">&commat;\1</a>',$value['description']);
$value['description'] = preg_replace('/@([\w\d]+)/','<a href="https://twitter.com/\1">&commat;\1</a>',$value['description']);
$value['description'] = preg_replace('/\ @([\w\d]+)@([\w\d_\.]+)/',' <a href="https://\2/users/\1">&commat;\1</a>',$value['description']);
$value['description'] = preg_replace('/\ @([\w\d]+)/',' <a href="https://twitter.com/\1">&commat;\1</a>',$value['description']);
}
return $data;
}