*/
function whitelist_protocols($url, $protocols)
{
- if (startsWith($url, '?') || startsWith($url, '/')) {
+ if (startsWith($url, '?') || startsWith($url, '/') || startsWith($url, '#')) {
return $url;
}
$protocols = array_merge(['http', 'https'], $protocols);
// Description: 836 characters gives roughly 342 pixel height.
// This is not perfect, but it's usually OK.
$length = strlen($link['title']) + (342 * strlen($link['description'])) / 836;
- if ($link['thumbnail']) {
+ if (!empty($link['thumbnail'])) {
$length += 100; // 1 thumbnails roughly takes 100 pixels height.
}
// Then put in column which is the less filled: