mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-21695 markdown conversion now does not break empty() and isnull() comparisons
This commit is contained in:
parent
6b8ad965dc
commit
a4a0c9d9cd
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue