*/ class HTMLDisplayHandler { /** * Reserved scripts */ public static $reservedCSS = '@\bcommon/css/(?:xe|mobile)\.(?:min\.)?css$@'; public static $reservedJS = '@\bcommon/js/(?:jquery(?:-[123][0-9.x-]+)?|xe?|common|js_app|xml_handler|xml_js_filter)\.(?:min\.)?js$@'; /** * Replacement table for XE compatibility */ public static $replacements = array( '@\bcommon/xeicon/@' => 'common/css/xeicon/', ); /** * Produce HTML compliant content given a module object.\n * @param ModuleObject $oModule the module object * @return string compiled template string */ function toDoc(&$oModule) { $oTemplate = TemplateHandler::getInstance(); // compile module tpl // deprecated themes skin $template_path = $oModule->getTemplatePath(); if(!is_dir($template_path)) { if($oModule->module_info->module == $oModule->module) { $skin = $oModule->origin_module_info->skin; } else { $skin = $oModule->module_config->skin; } if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') === false) { if($skin && is_string($skin)) { $theme_skin = explode('|@|', $skin); $template_path = $oModule->getTemplatePath(); if(count($theme_skin) == 2) { $theme_path = sprintf('./themes/%s', $theme_skin[0]); // FIXME $theme_path $theme_path $theme_path ?? if(substr($theme_path, 0, strlen($theme_path)) != $theme_path) { $template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]); } } } else { $template_path = $oModule->getTemplatePath(); } } else { $template_path = $oModule->getTemplatePath(); } } $tpl_file = $oModule->getTemplateFile(); $output = $oTemplate->compile($template_path, $tpl_file); // SECISSUE https://github.com/xpressengine/xe-core/issues/1583 $oSecurity = new Security(); $oSecurity->encodeHTML('is_keyword'); // add .x div for adminitration pages if(Context::getResponseMethod() == 'HTML') { if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify') { $output = '