Revert "MDL-61876 admin: set default forceclean=1"

This reverts commit c182f060fa.
This commit is contained in:
Andrew Nicols
2018-05-08 13:28:12 +08:00
parent e3a1b34376
commit 1144ae255f
4 changed files with 2 additions and 14 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
new lang_string('configuserquota', 'admin', $params), $defaultuserquota, PARAM_INT, 30));
$temp->add(new admin_setting_configcheckbox('forceclean', new lang_string('forceclean', 'core_admin'),
new lang_string('forceclean_desc', 'core_admin'), 1));
new lang_string('forceclean_desc', 'core_admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowobjectembed', new lang_string('allowobjectembed', 'admin'), new lang_string('configallowobjectembed', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enabletrusttext', new lang_string('enabletrusttext', 'admin'), new lang_string('configenabletrusttext', 'admin'), 0));
-2
View File
@@ -858,9 +858,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
* Test get_course_contents
*/
public function test_get_course_contents() {
global $CFG;
$this->resetAfterTest(true);
$CFG->forceclean = 0;
list($course, $forumcm, $datacm, $pagecm, $labelcm, $urlcm) = $this->prepare_get_course_contents_test();
-3
View File
@@ -109,9 +109,6 @@ class core_weblib_format_text_testcase extends advanced_testcase {
* @param string $expected The expected filter value
*/
public function test_format_text_blanktarget($link, $expected) {
global $CFG;
$this->resetAfterTest();
$CFG->forceclean = 0;
$actual = format_text($link, FORMAT_MOODLE, array('blanktarget' => true, 'filter' => false, 'noclean' => true));
$this->assertEquals($expected, $actual);
}
+1 -8
View File
@@ -104,7 +104,6 @@ class media_swf_testcase extends advanced_testcase {
*/
public function test_embed_link() {
global $CFG;
$CFG->forceclean = 0;
$url = new moodle_url('http://example.org/some_filename.swf');
$text = html_writer::link($url, 'Watch this one');
$content = format_text($text, FORMAT_HTML, ['trusted' => true]);
@@ -114,13 +113,9 @@ class media_swf_testcase extends advanced_testcase {
$this->assertRegExp('~width="' . $CFG->media_default_width . '" height="' .
$CFG->media_default_height . '"~', $content);
// Not working without trust or with $CFG->forceclean!
// Not working without trust!
$content = format_text($text, FORMAT_HTML);
$this->assertNotRegExp('~mediaplugin_swf~', $content);
$CFG->forceclean = 1;
$content = format_text($text, FORMAT_HTML, ['trusted' => true]);
$this->assertNotRegExp('~mediaplugin_swf~', $content);
}
/**
@@ -130,8 +125,6 @@ class media_swf_testcase extends advanced_testcase {
*/
public function test_embed_media() {
global $CFG;
$CFG->forceclean = 0;
$url = new moodle_url('http://example.org/some_filename.swf');
$trackurl = new moodle_url('http://example.org/some_filename.vtt');
$text = '<video controls="true"><source src="'.$url.'"/>' .