Avoids populating a markdown empty container if there's no description.

This commit is contained in:
kalvn 2016-02-28 18:24:30 +01:00
parent 8710d4da8e
commit 841df2dd55

View file

@ -173,7 +173,10 @@ function process_markdown($description)
->setBreaksEnabled(true)
->text($processedDescription);
$processedDescription = sanitize_html($processedDescription);
$processedDescription = '<div class="markdown">'. $processedDescription . '</div>';
if(!empty($processedDescription)){
$processedDescription = '<div class="markdown">'. $processedDescription . '</div>';
}
return $processedDescription;
}