diff --git a/sources/Renderer/BlockRenderer.php b/sources/Renderer/BlockRenderer.php
index 9c2d206b69..2dff4d4a0a 100644
--- a/sources/Renderer/BlockRenderer.php
+++ b/sources/Renderer/BlockRenderer.php
@@ -21,7 +21,6 @@ namespace Combodo\iTop\Renderer;
use Combodo\iTop\Application\TwigBase\Twig\TwigHelper;
use Combodo\iTop\Application\UI\iUIBlock;
-use utils;
/**
* Class BlockRenderer
@@ -221,8 +220,6 @@ class BlockRenderer
HTML;
}
- // TODO 2.8.0
- //$sOutput .= utils::FilterXSS($this->RenderHtml());
$sOutput .= $this->RenderHtml();
// JS last so all markup is build and ready
diff --git a/sources/application/WebPage/TabManager.php b/sources/application/WebPage/TabManager.php
index a5530ce9f4..d064e7858b 100644
--- a/sources/application/WebPage/TabManager.php
+++ b/sources/application/WebPage/TabManager.php
@@ -284,102 +284,7 @@ class TabManager
*/
public function RenderIntoContent(string $sContent, WebPage $oPage)
{
- // Render the tabs in the page (if any)
- $container_index = 0;
- foreach ($this->m_aTabs as $sTabContainerName => $aTabs) {
- $sTabs = '';
- $sPrefix = $aTabs['prefix'];
- if (count($aTabs['tabs']) > 0) {
- // Clean tabs
- foreach ($aTabs['tabs'] as $sTabCode => $aTabData) {
- // Sometimes people set an empty tab to force content NOT to be rendered in the previous one. We need to remove them.
- // Note: Look for "->SetCurrentTab('');" for examples.
- if ($sTabCode === '') {
- unset($aTabs['tabs'][$sTabCode]);
- }
- }
-
- // Render tabs
- if ($oPage->IsPrintableVersion()) {
- $oPage->add_ready_script(
- <<< EOF
-oHiddeableChapters = {};
-EOF
- );
- $sTabs = "\n
\n";
- $i = 0;
- foreach ($aTabs['tabs'] as $sTabCode => $aTabData) {
- $sTabCodeForJs = addslashes($sTabCode);
- $sTabTitleForHtml = utils::HtmlEntities($aTabData['title']);
- $sTabId = "tab_{$sPrefix}{$container_index}$i";
- switch ($aTabData['type']) {
- case static::ENUM_TAB_TYPE_AJAX:
- $sTabHtml = '';
- $sUrl = $aTabData['url'];
- $oPage->add_ready_script(
- <<< EOF
-$.post('$sUrl', {printable: '1'}, function(data){
- $('#$sTabId > .printable-tab-content').append(data);
-});
-EOF
- );
- break;
-
- case static::ENUM_TAB_TYPE_HTML:
- default:
- $sTabHtml = $aTabData['html'];
- }
- $sTabs .= "
$sTabTitleForHtml
".$sTabHtml."
\n";
- $oPage->add_ready_script(
- <<< EOF
-oHiddeableChapters['$sTabId'] = '$sTabTitleForHtml';
-EOF
- );
- $i++;
- }
- $sTabs .= "
\n\n";
- } else {
- $sTabs = "\n\n";
- $sTabs .= "
\n";
- // Display the unordered list that will be rendered as the tabs
- $i = 0;
- foreach ($aTabs['tabs'] as $sTabCode => $aTabData) {
- $sTabCodeForHtml = utils::HtmlEntities($sTabCode);
- $sTabTitleForHtml = utils::HtmlEntities($aTabData['title']);
- switch ($aTabData['type']) {
- case static::ENUM_TAB_TYPE_AJAX:
- $sTabs .= "- $sTabTitleForHtml
\n";
- break;
-
- case static::ENUM_TAB_TYPE_HTML:
- default:
- $sTabs .= "- $sTabTitleForHtml
\n";
- }
- $i++;
- }
- $sTabs .= "
\n";
- // Now add the content of the tabs themselves
- $i = 0;
- foreach ($aTabs['tabs'] as $sTabCode => $aTabData) {
- switch ($aTabData['type']) {
- case static::ENUM_TAB_TYPE_AJAX:
- // Nothing to add
- break;
-
- case static::ENUM_TAB_TYPE_HTML:
- default:
- $sTabs .= "
".$aTabData['html']."
\n";
- }
- $i++;
- }
- $sTabs .= "
\n\n";
- }
- }
- $sContent = str_replace("\$Tabs:$sTabContainerName\$", $sTabs, $sContent);
- $container_index++;
- }
-
- return $sContent;
+ return '';
}
/**
diff --git a/sources/application/WebPage/WebPage.php b/sources/application/WebPage/WebPage.php
index 4dfd05df17..42b26d0202 100644
--- a/sources/application/WebPage/WebPage.php
+++ b/sources/application/WebPage/WebPage.php
@@ -697,10 +697,8 @@ class WebPage implements Page
public function output()
{
// Send headers
- if ($this->GetOutputFormat() === 'html') {
- foreach ($this->a_headers as $sHeader) {
- header($sHeader);
- }
+ foreach ($this->a_headers as $sHeader) {
+ header($sHeader);
}
$this->s_content = $this->ob_get_clean_safe();
@@ -730,7 +728,7 @@ class WebPage implements Page
'aCssInline' => $this->a_styles,
'aJsFiles' => $this->a_linked_scripts,
'aJsInlineLive' => $this->a_scripts,
- // TODO 2.8.0: TEMP, used while developping, remove it.
+ // TODO 2.8.0: TEMP, used while developing, remove it.
'sSanitizedContent' => utils::FilterXSS($this->s_content),
'sDeferredContent' => utils::FilterXSS($this->s_deferred_content),
];
@@ -1012,8 +1010,7 @@ class WebPage implements Page
*/
protected function outputCollapsibleSectionInit()
{
- if (!$this->bHasCollapsibleSection)
- {
+ if (!$this->bHasCollapsibleSection) {
return;
}
diff --git a/sources/application/WebPage/iTopWebPage.php b/sources/application/WebPage/iTopWebPage.php
index 7aa55f4fbe..99e6461172 100644
--- a/sources/application/WebPage/iTopWebPage.php
+++ b/sources/application/WebPage/iTopWebPage.php
@@ -40,7 +40,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage
const DEFAULT_BREADCRUMB_ENTRY_ICON_TYPE = self::ENUM_BREADCRUMB_ENTRY_ICON_TYPE_IMAGE;
/** @var string DEFAULT_PAGE_TEMPLATE_REL_PATH The relative path (from