diff --git a/NEWS.md b/NEWS.md index f7e4ed70cd8a909fe7ec2b3cd769a8699906349b..3c08ee25cfc85057e4af946cabfadc1b4bad1be0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -116,6 +116,14 @@ After: getTreeList(42, 4) result: '0, 22, 11, 4' +* Removal of HTML Tidy and its options + +The possibility to use the external tool HTML Tidy that is used to clean up +incomplete HTML when a frontend page is rendered was removed from the TYPO3 +Core. Its functionality is now provided by the TER extension "Tidy". +The extension works with the same options as before. + + ### Administration / Customization * Content-length header (TypoScript setting config.enableContentLengthHeader) diff --git a/typo3/sysext/core/Configuration/DefaultConfiguration.php b/typo3/sysext/core/Configuration/DefaultConfiguration.php index 162bd729014d37607305bca7a41dc9c186c95ec5..0a99d5b79e3467dd6b36f0243e3fb49701f8ad76 100644 --- a/typo3/sysext/core/Configuration/DefaultConfiguration.php +++ b/typo3/sysext/core/Configuration/DefaultConfiguration.php @@ -656,9 +656,6 @@ return array( ), 'FE' => array( // Configuration for the TypoScript frontend (FE). Nothing here relates to the administration backend! 'png_to_gif' => FALSE, // Boolean: Enables conversion back to gif of all png-files generated in the frontend libraries. Notice that this leaves an increased number of temporary files in typo3temp/ - 'tidy' => FALSE, // Boolean: If set, the output html-code will be passed through "tidy" which is a little program you can get from <a href="http://www.w3.org/People/Raggett/tidy/" target="_blank">w3c.org</a>. "Tidy" cleans the HTML-code for nice display! - 'tidy_option' => 'cached', // options [all, cached, output]. "all" = the content is always passed through "tidy" before it may be stored in cache. "cached" = only if the page is put into the cache, "output" = only the output code just before it's echoed out. - 'tidy_path' => 'tidy -i --quiet true --tidy-mark true -wrap 0 -raw', // Path with options for tidy. For XHTML output, add " --output-xhtml true" 'addAllowedPaths' => '', // Additional relative paths (comma-list) to allow TypoScript resources be in. Should be prepended with '/'. If not, then any path where the first part is like this path will match. That is: 'myfolder/ , myarchive' will match eg. 'myfolder/', 'myarchive/', 'myarchive_one/', 'myarchive_2/' ... No check is done to see if this directory actually exists in the root of the site. Paths are matched by simply checking if these strings equals the first part of any TypoScript resource filepath. (See class template, function init() in \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser) 'allowedTempPaths' => '', // Additional paths allowed for temporary images. Used with imgResource. Eg. 'alttypo3temp/,another_temp_dir/'; 'debug' => FALSE, // Boolean: If set, some debug HTML-comments may be output somewhere. Can also be set by TypoScript. diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php index 15d0f177e6aa19d583d0f4b5b68f23794cdf38f6..87d24b4a22288462a33663db71e324f2925ef065 100644 --- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php +++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -3309,7 +3309,7 @@ class TypoScriptFrontendController { /** * Does some processing AFTER the pagegen script is included. - * This includes calling tidy (if configured), XHTML cleaning (if configured), caching the page, indexing the page (if configured) and setting sysLastChanged + * This includes calling XHTML cleaning (if configured), caching the page, indexing the page (if configured) and setting sysLastChanged * * @return void * @todo Define visibility @@ -3319,12 +3319,6 @@ class TypoScriptFrontendController { if ($this->no_cacheBeforePageGen) { $this->set_no_cache('no_cache has been set before the page was generated - safety check', TRUE); } - // Tidy up the code, if flag... - if ($this->TYPO3_CONF_VARS['FE']['tidy_option'] == 'all') { - $GLOBALS['TT']->push('Tidy, all', ''); - $this->content = $this->tidyHTML($this->content); - $GLOBALS['TT']->pull(); - } // XHTML-clean the code, if flag set if ($this->doXHTML_cleaning() == 'all') { $GLOBALS['TT']->push('XHTML clean, all', ''); @@ -3347,12 +3341,6 @@ class TypoScriptFrontendController { } // Processing if caching is enabled: if (!$this->no_cache) { - // Tidy up the code, if flag... - if ($this->TYPO3_CONF_VARS['FE']['tidy_option'] == 'cached') { - $GLOBALS['TT']->push('Tidy, cached', ''); - $this->content = $this->tidyHTML($this->content); - $GLOBALS['TT']->pull(); - } // XHTML-clean the code, if flag set if ($this->doXHTML_cleaning() == 'cached') { $GLOBALS['TT']->push('XHTML clean, cached', ''); @@ -3627,7 +3615,7 @@ if (version == "n3") { /** * Process the output before it's actually outputted. Sends headers also. - * This includes substituting the "username" comment, sending additional headers (as defined in the TypoScript "config.additionalheaders" object), tidy'ing content, XHTML cleaning content (if configured) + * This includes substituting the "username" comment, sending additional headers (as defined in the TypoScript "config.additionalheaders" object), XHTML cleaning content (if configured) * Works on $this->content. * * @return void @@ -3659,12 +3647,6 @@ if (version == "n3") { if (!$this->isClientCachable) { $this->contentStrReplace(); } - // Tidy up the code, if flag... - if ($this->TYPO3_CONF_VARS['FE']['tidy_option'] == 'output') { - $GLOBALS['TT']->push('Tidy, output', ''); - $this->content = $this->tidyHTML($this->content); - $GLOBALS['TT']->pull(); - } // XHTML-clean the code, if flag set if ($this->doXHTML_cleaning() == 'output') { $GLOBALS['TT']->push('XHTML clean, output', ''); @@ -4215,9 +4197,11 @@ if (version == "n3") { * * @param string $content The page content to clean up. Will be written to a temporary file which "tidy" is then asked to clean up. File content is read back and returned. * @return string Returns the + * @deprecated tidy and its options were deprecated with TYPO3 CMS 6.2, this function will be removed two versions later. If you need tidy, use the extension "tidy" from TER. * @todo Define visibility */ public function tidyHTML($content) { + GeneralUtility::logDeprecatedFunction(); if ($this->TYPO3_CONF_VARS['FE']['tidy'] && $this->TYPO3_CONF_VARS['FE']['tidy_path']) { $oldContent = $content; // Create temporary name