X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUtils.php;h=0a5b476ebf9779bbe47f8ea7f28ef0de21b28481;hb=9e425954817621711a528bb3bd2972692a2a528a;hp=7d7eaffdb71b86abe8b56b879fcbb968a7fb511e;hpb=0c4c7ae818336d5b0f94562e551ca1a3f34d3435;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Utils.php b/application/Utils.php index 7d7eaffd..0a5b476e 100644 --- a/application/Utils.php +++ b/application/Utils.php @@ -31,7 +31,15 @@ function logm($logFile, $clientIp, $message) * - are NOT cryptographically secure (they CAN be forged) * * In Shaarli, they are used as a tinyurl-like link to individual entries, - * e.g. smallHash('20111006_131924') --> yZH23w + * built once with the combination of the date and item ID. + * e.g. smallHash('20111006_131924' . 142) --> eaWxtQ + * + * @warning before v0.8.1, smallhashes were built only with the date, + * and their value has been preserved. + * + * @param string $text Create a hash from this text. + * + * @return string generated small hash. */ function smallHash($text) { @@ -106,7 +114,9 @@ function unescape($str) } /** - * Link sanitization before templating + * Sanitize link before rendering. + * + * @param array $link Link to escape. */ function sanitizeLink(&$link) {