summaryrefslogtreecommitdiff
path: root/utils/modules/news.php
diff options
context:
space:
mode:
Diffstat (limited to 'utils/modules/news.php')
-rw-r--r--utils/modules/news.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/modules/news.php b/utils/modules/news.php
index d7ad99c..9e542ae 100644
--- a/utils/modules/news.php
+++ b/utils/modules/news.php
@@ -5,6 +5,7 @@ include_once($UTIL_DIR . "/convert.php");
include_once($UTIL_DIR . "/forms.php");
include_once($UTIL_DIR . "/user.php");
include_once($MODULES_DIR . "/icons.php");
+include_once($UTIL_DIR . "/markdown.php");
class NewsEntry {
public $title;
@@ -19,6 +20,8 @@ class NewsEntry {
global $users, $DATA_DIR, $ICONS_DIR;
if(!isset($users)) $users = new Users($DATA_DIR . "/users.xml");
+ $content = Markdown(htmlspecialchars_decode($this->description));
+
$icons = new Icons($ICONS_DIR."/");
$icon = $icons->icons[$this->icon];
@@ -29,7 +32,7 @@ class NewsEntry {
$str .= " <div class=\"news_user\">By: " . $users->findUser($this->userid)->userid . "</div>\n";
$str .= " <div class=\"news_description\">\n";
if($this->icon) $str .= " <img alt=\"icon\" class=\"news_icon\" src=\"" . $icon->prefix.$icon->file . "\"/>\n";
- $str .= " ".htmlspecialchars_decode($this->description, ENT_QUOTES) . "\n";
+ $str .= " ".$content. "\n";
$str .= " </div>\n";
$str .= "</div>\n";
return $str;