diff --git a/question/type/ddimageortext/edit_ddimageortext_form.php b/question/type/ddimageortext/edit_ddimageortext_form.php index 21a2f46cb17..59b1d3b0b1d 100644 --- a/question/type/ddimageortext/edit_ddimageortext_form.php +++ b/question/type/ddimageortext/edit_ddimageortext_form.php @@ -197,7 +197,7 @@ class qtype_ddimageortext_edit_form extends qtype_ddtoimage_edit_form_base { // We do the necessary validation in the validation method. $repeatedoptions['drops[xleft]']['type'] = PARAM_RAW; $repeatedoptions['drops[ytop]']['type'] = PARAM_RAW; - $repeatedoptions['drops[droplabel]']['type'] = PARAM_RAW; + $repeatedoptions['drops[droplabel]']['type'] = PARAM_TEXT; $repeatedoptions['choice']['default'] = '0'; return $repeatedoptions; } diff --git a/question/type/ddimageortext/rendererbase.php b/question/type/ddimageortext/rendererbase.php index cb201cd397d..294a60afe23 100644 --- a/question/type/ddimageortext/rendererbase.php +++ b/question/type/ddimageortext/rendererbase.php @@ -114,6 +114,7 @@ class qtype_ddtoimage_renderer_base extends qtype_with_combined_feedback_rendere $output .= $html; $placeinfo = (object) (array) $place; $placeinfo->fieldname = $fieldname; + $placeinfo->text = format_string($placeinfo->text); $placeinfoforjsandmobileapp[$placeno] = $placeinfo; }