diff options
Diffstat (limited to 'app/Core/Helper.php')
-rw-r--r-- | app/Core/Helper.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Core/Helper.php b/app/Core/Helper.php index 82dd6698..5eaa8dc9 100644 --- a/app/Core/Helper.php +++ b/app/Core/Helper.php @@ -498,14 +498,14 @@ class Helper * @param array $link Link parameters for replacement * @return string */ - public function markdown($text, array $link = array('controller' => 'task', 'action' => 'show', 'params' => array())) + public function markdown($text, array $link = array()) { $html = Parsedown::instance() ->setMarkupEscaped(true) # escapes markup (HTML) ->text($text); // Replace task #123 by a link to the task - if (preg_match_all('!#(\d+)!i', $html, $matches, PREG_SET_ORDER)) { + if (! empty($link) && preg_match_all('!#(\d+)!i', $html, $matches, PREG_SET_ORDER)) { foreach ($matches as $match) { |