From 3d38777333eb6b8f5cafdbc2b5e654450701d855 Mon Sep 17 00:00:00 2001 From: Davo Smith Date: Tue, 12 Mar 2013 19:46:14 +0000 Subject: [PATCH] MDL-38426 mod_label - correctly handle plain text that has been added by drag and drop upload --- mod/label/lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/label/lib.php b/mod/label/lib.php index b9149050b82..224f74c1829 100644 --- a/mod/label/lib.php +++ b/mod/label/lib.php @@ -264,6 +264,9 @@ function label_dndupload_handle($uploadinfo) { } } else if (!empty($uploadinfo->content)) { $data->intro = $uploadinfo->content; + if ($uploadinfo->type != 'text/html') { + $data->introformat = FORMAT_PLAIN; + } } return label_add_instance($data, null);