aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2016-03-01 12:15:22 +0100
committerArthur <arthur@hoa.ro>2016-03-01 12:15:22 +0100
commit40b25bef6a027b8e39975a84e8843a921ac1f607 (patch)
treea8e3a890a3d4f66a15260c56b01c8099516807c6
parent6e7a3210c3ec2b70b748d513bbd5168a887bf0ea (diff)
parent841df2dd5512a77f8c0150bef8977010fdf0dc0c (diff)
downloadShaarli-40b25bef6a027b8e39975a84e8843a921ac1f607.tar.gz
Shaarli-40b25bef6a027b8e39975a84e8843a921ac1f607.tar.zst
Shaarli-40b25bef6a027b8e39975a84e8843a921ac1f607.zip
Merge pull request #506 from kalvn/master
Avoids populating a markdown empty container if there's no description.
-rw-r--r--plugins/markdown/markdown.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/markdown/markdown.php b/plugins/markdown/markdown.php
index a45b6574..5a702c7b 100644
--- a/plugins/markdown/markdown.php
+++ b/plugins/markdown/markdown.php
@@ -173,7 +173,10 @@ function process_markdown($description)
173 ->setBreaksEnabled(true) 173 ->setBreaksEnabled(true)
174 ->text($processedDescription); 174 ->text($processedDescription);
175 $processedDescription = sanitize_html($processedDescription); 175 $processedDescription = sanitize_html($processedDescription);
176 $processedDescription = '<div class="markdown">'. $processedDescription . '</div>'; 176
177 if(!empty($processedDescription)){
178 $processedDescription = '<div class="markdown">'. $processedDescription . '</div>';
179 }
177 180
178 return $processedDescription; 181 return $processedDescription;
179} 182}