Compare commits

..

1 Commits

Author SHA1 Message Date
n 745ac3077d
regex fixes
lint / lint (push) Successful in 14s Details
2024-02-25 20:41:33 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ function hook_clickat_render_linklist($data)
'/([^\S]+)@([\w]+)/' => ' <a href="https://twitter.com/\2">&commat;\2</a>'
);
foreach ($data['links'] as &$value) {
if (strpos($value['description'], ' @') !== false) {
if (strpos($value['description'], '@') !== false) {
foreach($patterns as $nic => $link) {
$value['description'] = preg_replace($nic, $link, $value['description']);
}