@@ -154,8 +154,6 @@ public function fixAltText($error_html, $new_content, $submitting_again = false)
154154 */
155155 public function fixCss ($ error_colors , $ error_html , $ new_content , $ submitting_again = false )
156156 {
157- $ this ->dom ->loadHTML ('<?xml encoding="utf-8" ?> ' . $ error_html );
158-
159157 $ fixed_css = $ error_html ;
160158
161159 for ($ i = 0 ; $ i < count ($ error_colors ); $ i ++) {
@@ -446,7 +444,7 @@ public function uploadFixedAssignments($corrected_error, $error_html)
446444 {
447445 $ get_uri = $ this ->base_uri ."/api/v1/courses/ " .$ this ->course_id ."/assignments/ " .$ this ->content_id ."?&access_token= " .$ this ->api_key ;
448446 $ content = Request::get ($ get_uri )->send ();
449- $ html = $ content ->body ->description ;
447+ $ html = html_entity_decode ( $ content ->body ->description ) ;
450448
451449 $ error_html = HTMLMinify::minify (str_replace ($ this ->annoying_entities , $ this ->entity_replacements , $ error_html ), ['doctype ' => 'html5 ' ]);
452450 $ corrected_error = HTMLMinify::minify (str_replace ($ this ->annoying_entities , $ this ->entity_replacements , $ corrected_error ), ['doctype ' => 'html5 ' ]);
@@ -467,7 +465,7 @@ public function uploadFixedDiscussions($corrected_error, $error_html)
467465 {
468466 $ get_uri = $ this ->base_uri ."/api/v1/courses/ " .$ this ->course_id ."/discussion_topics/ " .$ this ->content_id ."?&access_token= " .$ this ->api_key ;
469467 $ content = Request::get ($ get_uri )->send ();
470- $ html = $ content ->body ->message ;
468+ $ html = html_entity_decode ( $ content ->body ->message ) ;
471469
472470 $ error_html = HTMLMinify::minify (str_replace ($ this ->annoying_entities , $ this ->entity_replacements , $ error_html ), ['doctype ' => 'html5 ' ]);
473471 $ corrected_error = HTMLMinify::minify (str_replace ($ this ->annoying_entities , $ this ->entity_replacements , $ corrected_error ), ['doctype ' => 'html5 ' ]);
@@ -558,7 +556,7 @@ public function uploadFixedPages($corrected_error, $error_html)
558556 {
559557 $ get_uri = $ this ->base_uri ."/api/v1/courses/ " .$ this ->course_id ."/pages/ " .$ this ->content_id ."?access_token= " .$ this ->api_key ;
560558 $ content = Request::get ($ get_uri )->send ();
561- $ html = $ content ->body ->body ;
559+ $ html = html_entity_decode ( $ content ->body ->body ) ;
562560
563561 $ error_html = HTMLMinify::minify (str_replace ($ this ->annoying_entities , $ this ->entity_replacements , $ error_html ), ['doctype ' => 'html5 ' ]);
564562 $ corrected_error = HTMLMinify::minify (str_replace ($ this ->annoying_entities , $ this ->entity_replacements , $ corrected_error ), ['doctype ' => 'html5 ' ]);
@@ -580,7 +578,7 @@ public function uploadFixedSyllabus($corrected_error, $error_html)
580578 {
581579 $ get_uri = $ this ->base_uri ."/api/v1/courses/ " .$ this ->course_id ."/?include[]=syllabus_body&access_token= " .$ this ->api_key ;
582580 $ content = Request::get ($ get_uri )->send ();
583- $ html = $ content ->body ->syllabus_body ;
581+ $ html = html_entity_decode ( $ content ->body ->syllabus_body ) ;
584582
585583 $ error_html = HTMLMinify::minify (str_replace ($ this ->annoying_entities , $ this ->entity_replacements , $ error_html ), ['doctype ' => 'html5 ' ]);
586584 $ corrected_error = HTMLMinify::minify (str_replace ($ this ->annoying_entities , $ this ->entity_replacements , $ corrected_error ), ['doctype ' => 'html5 ' ]);
0 commit comments