summaryrefslogtreecommitdiff
path: root/app/Helper
diff options
context:
space:
mode:
Diffstat (limited to 'app/Helper')
-rw-r--r--app/Helper/TextHelper.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Helper/TextHelper.php b/app/Helper/TextHelper.php
index 97b12c49..654eb171 100644
--- a/app/Helper/TextHelper.php
+++ b/app/Helper/TextHelper.php
@@ -39,6 +39,18 @@ class TextHelper extends Base
}
/**
+ * Escape Markdown text that need to be stored in HTML attribute
+ *
+ * @access public
+ * @param string $text
+ * @return mixed
+ */
+ public function markdownAttribute($text)
+ {
+ return htmlentities($this->markdown($text), ENT_QUOTES, 'UTF-8');
+ }
+
+ /**
* Format a file size
*
* @param integer $size Size in bytes