summaryrefslogtreecommitdiff
path: root/app/Helper/TextHelper.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-04-29 18:43:57 -0400
committerFrederic Guillot <fred@kanboard.net>2016-04-29 18:43:57 -0400
commit9fa8f63d25a1bd1b2ce17c5dc610680aefa290fe (patch)
tree7348ec8646c4f08ad4515aa15e2cdd689b005f10 /app/Helper/TextHelper.php
parenta34f83fb3044b51a8cb519a97ad27853ef4a068a (diff)
Fixed improper Markdown escaping for some tooltips
Diffstat (limited to 'app/Helper/TextHelper.php')
-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