diff options
Diffstat (limited to 'unshorturl')
-rw-r--r-- | unshorturl/unshorturl.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unshorturl/unshorturl.php b/unshorturl/unshorturl.php index 70d7cf6..e8c747a 100644 --- a/unshorturl/unshorturl.php +++ b/unshorturl/unshorturl.php @@ -28,12 +28,12 @@ function unshorturl_prepare_body(&$body) { } $matches = []; - $num_matches = preg_match_all('/https?:\/\/bit\.ly\/\w+/', $body['html'], $links); + $num_matches = preg_match_all('/https?:\/\/bit\.ly\/\w+/', $body['html'], $matches); if ($num_matches > 0) { foreach ($matches as $links) { error_log('unshorturl: Links found: ' . implode(', ', $links)); foreach($links as $l) { - str_replace($l, '[filtered bit.ly url]', $body['html']); + $body['html'] = str_replace($l, '[filtered bit.ly url]', $body['html']); } } } |