]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #1426 from aguytech/v0.11-fixes v0.11
authorArthurHoaro <arthur@hoa.ro>
Thu, 25 Jun 2020 11:57:51 +0000 (13:57 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2020 11:57:51 +0000 (13:57 +0200)
application/http/UrlUtils.php
index.php

index 4bc84b823d7ce8d3d44dec028facb6ab28610aed..e8d1a283fca632ecce9af242f8676c7f824015a4 100644 (file)
@@ -73,7 +73,7 @@ function add_trailing_slash($url)
  */
 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);
index 9e473936ab0ab76cc3d5d23dfb6cffc6c13c2468..6ec5507ebdf9b7589b743542086de716b605142b 100644 (file)
--- a/index.php
+++ b/index.php
@@ -465,7 +465,7 @@ function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager, $loginManager)
         // 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: