Skip to content

Commit

Permalink
MDL-45432 mod_assign Declare character encoding in onlinetext export
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
  • Loading branch information
tonyjbutler authored and danpoltawski committed May 19, 2014
1 parent 7c75924 commit 20bd24b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mod/assign/submission/onlinetext/locallib.php
Expand Up @@ -393,7 +393,8 @@ public function get_files(stdClass $submission, stdClass $user) {
$formattedtext = format_text($finaltext,
$onlinetextsubmission->onlineformat,
array('context'=>$this->assignment->get_context()));
$submissioncontent = '<html><body>'. $formattedtext . '</body></html>';
$head = '<head><meta charset="UTF-8"></head>';
$submissioncontent = '<!DOCTYPE html><html>' . $head . '<body>'. $formattedtext . '</body></html>';

$filename = get_string('onlinetextfilename', 'assignsubmission_onlinetext');
$files[$filename] = array($submissioncontent);
Expand Down

0 comments on commit 20bd24b

Please sign in to comment.