Welcome

Giant Robots!

'; $safeContent = '

Welcome

Giant Robots!

'; $field = new EditableLiteralField(); // Test with sanitisation enabled Config::inst()->update('HtmlEditorField', 'sanitise_server_side', true); $field->setContent($rawContent); $this->assertEquals($safeContent, $field->getContent()); // Test with sanitisation disabled Config::inst()->remove('HtmlEditorField', 'sanitise_server_side'); $field->setContent($rawContent); $this->assertEquals($rawContent, $field->getContent()); } }