protected static function createDocument() { $lang = self::getLanguage(); // @deprecated 12.1 This will be removed in the next version $raw = MRequest::getBool('no_html'); $type = MRequest::getWord('format', $raw ? 'raw' : 'html'); $attributes = array('charset' => 'utf-8', 'lineend' => 'unix', 'tab' => ' ', 'language' => $lang->getTag(), 'direction' => $lang->isRTL() ? 'rtl' : 'ltr'); return MDocument::getInstance($type, $attributes); }