diff options
Diffstat (limited to 'application/formatter/BookmarkMarkdownFormatter.php')
-rw-r--r-- | application/formatter/BookmarkMarkdownFormatter.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/application/formatter/BookmarkMarkdownFormatter.php b/application/formatter/BookmarkMarkdownFormatter.php index 7797bfbf..077e5312 100644 --- a/application/formatter/BookmarkMarkdownFormatter.php +++ b/application/formatter/BookmarkMarkdownFormatter.php | |||
@@ -36,10 +36,12 @@ class BookmarkMarkdownFormatter extends BookmarkDefaultFormatter | |||
36 | * LinkMarkdownFormatter constructor. | 36 | * LinkMarkdownFormatter constructor. |
37 | * | 37 | * |
38 | * @param ConfigManager $conf instance | 38 | * @param ConfigManager $conf instance |
39 | * @param bool $isLoggedIn | ||
39 | */ | 40 | */ |
40 | public function __construct(ConfigManager $conf) | 41 | public function __construct(ConfigManager $conf, bool $isLoggedIn) |
41 | { | 42 | { |
42 | parent::__construct($conf); | 43 | parent::__construct($conf, $isLoggedIn); |
44 | |||
43 | $this->parsedown = new \Parsedown(); | 45 | $this->parsedown = new \Parsedown(); |
44 | $this->escape = $conf->get('security.markdown_escape', true); | 46 | $this->escape = $conf->get('security.markdown_escape', true); |
45 | $this->allowedProtocols = $conf->get('security.allowed_protocols', []); | 47 | $this->allowedProtocols = $conf->get('security.allowed_protocols', []); |
@@ -79,7 +81,7 @@ class BookmarkMarkdownFormatter extends BookmarkDefaultFormatter | |||
79 | protected function formatTagList($bookmark) | 81 | protected function formatTagList($bookmark) |
80 | { | 82 | { |
81 | $out = parent::formatTagList($bookmark); | 83 | $out = parent::formatTagList($bookmark); |
82 | if (($pos = array_search(self::NO_MD_TAG, $out)) !== false) { | 84 | if ($this->isLoggedIn === false && ($pos = array_search(self::NO_MD_TAG, $out)) !== false) { |
83 | unset($out[$pos]); | 85 | unset($out[$pos]); |
84 | return array_values($out); | 86 | return array_values($out); |
85 | } | 87 | } |