Project

General

Profile

Bug #17279 ยป tidy_patch.txt

Administrator Admin, 2007-05-05 15:59

 
--- class.tslib_fe.org.php 2007-05-05 15:11:06.299447763 +0200
+++ class.tslib_fe.php 2007-05-05 15:26:39.724284385 +0200
@@ -3637,7 +3637,15 @@
fputs ($fp, $content); // Put $content
@fclose ($fp); // Close

- exec ($this->TYPO3_CONF_VARS['FE']['tidy_path'].' '.$fname, $output); // run the $content through 'tidy', which formats the HTML to nice code.
+ switch ($this->config['config']['metaCharset']){
+
+ case 'utf-8': $charsetOpt = '-utf8';
+ break;
+ default: $charsetOpt = '-latin1';
+ }
+
+ $tidyPath = str_replace('###CHARSET###',$charsetOpt, $this->TYPO3_CONF_VARS['FE']['tidy_path']);
+ exec ($tidyPath.' '.$fname, $output); // run the $content through 'tidy', which formats the HTML to nice code.
@unlink ($fname); // Delete the tempfile again
$content = implode(chr(10),$output);
if (!trim($content)) {
    (1-1/1)