X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FLinkUtils.php;h=d56e019f4246f40d94f7a2eb5b8f715d10c7f1a1;hb=f211e417bf637b8a83988175c29ee072c69f7642;hp=4df5c0cababf247357d89ebd002e4b49a7910cf6;hpb=0deaedeeaef088040fb015f5be3e270e3bae508e;p=github%2Fshaarli%2FShaarli.git diff --git a/application/LinkUtils.php b/application/LinkUtils.php index 4df5c0ca..d56e019f 100644 --- a/application/LinkUtils.php +++ b/application/LinkUtils.php @@ -23,7 +23,7 @@ function get_curl_download_callback(&$charset, &$title, $curlGetInfo = 'curl_get * * @return int|bool length of $data or false if we need to stop the download */ - return function(&$ch, $data) use ($curlGetInfo, &$charset, &$title, &$isRedirected) { + return function (&$ch, $data) use ($curlGetInfo, &$charset, &$title, &$isRedirected) { $responseCode = $curlGetInfo($ch, CURLINFO_RESPONSE_CODE); if (!empty($responseCode) && in_array($responseCode, [301, 302])) { $isRedirected = true; @@ -201,7 +201,8 @@ function space2nbsp($text) * @return string formatted description. */ -function format_description($description, $redirector = '', $urlEncode = true, $indexUrl = '') { +function format_description($description, $redirector = '', $urlEncode = true, $indexUrl = '') +{ return nl2br(space2nbsp(hashtag_autolink(text2clickable($description, $redirector, $urlEncode), $indexUrl))); }