@@ -155,15 +155,15 @@ public function export_for_template(\renderer_base $renderer, $plaintext = false
155155 protected function export_for_template_text (\mod_moodleoverflow_renderer $ renderer ) {
156156
157157 return array (
158- 'id ' => html_entity_decode ($ this ->post ->id ),
159- 'coursename ' => html_entity_decode ($ this ->get_coursename ()),
160- 'courselink ' => html_entity_decode ($ this ->get_courselink ()),
161- 'moodleoverflowname ' => html_entity_decode ($ this ->get_moodleoverflowname ()),
162- 'showdiscussionname ' => html_entity_decode ($ this ->has_showdiscussionname ()),
163- 'discussionname ' => html_entity_decode ($ this ->get_discussionname ()),
164- 'subject ' => html_entity_decode ($ this ->get_subject ()),
165- 'authorfullname ' => html_entity_decode ($ this ->get_author_fullname ()),
166- 'postdate ' => html_entity_decode ($ this ->get_postdate ()),
158+ 'id ' => html_entity_decode ($ this ->post ->id , ENT_COMPAT ),
159+ 'coursename ' => html_entity_decode ($ this ->get_coursename (), ENT_COMPAT ),
160+ 'courselink ' => html_entity_decode ($ this ->get_courselink (), ENT_COMPAT ),
161+ 'moodleoverflowname ' => html_entity_decode ($ this ->get_moodleoverflowname (), ENT_COMPAT ),
162+ 'showdiscussionname ' => html_entity_decode ($ this ->has_showdiscussionname (), ENT_COMPAT ),
163+ 'discussionname ' => html_entity_decode ($ this ->get_discussionname (), ENT_COMPAT ),
164+ 'subject ' => html_entity_decode ($ this ->get_subject (), ENT_COMPAT ),
165+ 'authorfullname ' => html_entity_decode ($ this ->get_author_fullname (), ENT_COMPAT ),
166+ 'postdate ' => html_entity_decode ($ this ->get_postdate (), ENT_COMPAT ),
167167 'firstpost ' => $ this ->is_firstpost (),
168168 'canreply ' => $ this ->canreply ,
169169 'permalink ' => $ this ->get_permalink (),
@@ -179,7 +179,7 @@ protected function export_for_template_text(\mod_moodleoverflow_renderer $render
179179 'grouppicture ' => $ this ->get_group_picture (),
180180
181181 // Format some components according to the renderer.
182- 'message ' => html_entity_decode ($ renderer ->format_message_text ($ this ->cm , $ this ->post )),
182+ 'message ' => html_entity_decode ($ renderer ->format_message_text ($ this ->cm , $ this ->post ), ENT_COMPAT ),
183183 );
184184 }
185185
0 commit comments