Merge branch 'ticket650' into develop

This commit is contained in:
Vincent BRIDIER 2022-03-28 16:58:16 +02:00
commit 183e5a98af
No known key found for this signature in database
GPG key ID: 8571BFA20420D512

View file

@ -26,7 +26,11 @@ class Utils
} else {
$url = $match;
if (\strpos($url, 'http') === false and \strpos($url, 'https') === false) {
$url = sprintf('http://%s', $url);
$url = sprintf(
'%s://%s',
config('app.env') !== 'local' ? 'https' : 'http',
$url
);
}
$fsligthbox = self::isImageFile($url) ? 'data-fslightbox="gallery"' : '';
return strlen($match) ? "<a $fsligthbox href=\"$url\" target=\"_blank\">$match</a>" : $match;