From a4a0c9d9cd4d1fe6573ac2c096ec5b1fad9e18a2 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 6 Jun 2010 17:17:06 +0000 Subject: [PATCH] MDL-21695 markdown conversion now does not break empty() and isnull() comparisons --- lib/weblib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/weblib.php b/lib/weblib.php index 5afb11aff30..8360f180e98 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1755,6 +1755,10 @@ function text_to_html($text, $smiley=true, $para=true, $newlines=true) { function markdown_to_html($text) { global $CFG; + if ($text === '' or $text === NULL) { + return $text; + } + require_once($CFG->libdir .'/markdown.php'); return Markdown($text);