summaryrefslogtreecommitdiff
path: root/app/Core/Helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Core/Helper.php')
-rw-r--r--app/Core/Helper.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/app/Core/Helper.php b/app/Core/Helper.php
index 34a5e6ab..29003416 100644
--- a/app/Core/Helper.php
+++ b/app/Core/Helper.php
@@ -502,7 +502,7 @@ class Helper
public function markdown($text, array $link = array())
{
$parser = new Markdown($link, $this);
- $parser->setMarkupEscaped(true);
+ $parser->setMarkupEscaped(MARKDOWN_ESCAPE_HTML);
return $parser->text($text);
}
@@ -770,4 +770,21 @@ class Helper
return 'fa-file-o';
}
+
+ /**
+ * Display gravatar image
+ *
+ * @access public
+ * @param string $email
+ * @param string $alt
+ * @return string
+ */
+ public function avatar($email, $alt = '')
+ {
+ if (! empty($email) && $this->config->get('integration_gravatar') == 1) {
+ return '<img class="avatar" src="https://www.gravatar.com/avatar/'.md5(strtolower($email)).'?s=25" alt="'.$this->e($alt).'" title="'.$this->e($alt).'">';
+ }
+
+ return '';
+ }
}