Fixed bug #17483: GifBuilder - meaningfulTempFilePrefix can cause invalid image urls
authorsgalinsk <sgalinsk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Tue, 22 Feb 2011 22:08:40 +0000 (22:08 +0000)
committersgalinsk <sgalinsk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Tue, 22 Feb 2011 22:08:40 +0000 (22:08 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10552 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_gifbuilder.php

index 9b92d9e..3c3d10b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-02-22  Stefan Galinski  <stefan.galinski@gmail.com>
+
+       * Fixed bug #17483: GifBuilder - meaningfulTempFilePrefix can cause invalid image urls
+
 2011-02-22  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #17670: Remove deprecated functions scheduled for removal in 4.6
index 5ed0d0d..653605d 100644 (file)
@@ -715,10 +715,11 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                $meaningfulPrefix = '';
 
                if ($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']) {
+                       /** @var $basicFileFunctions t3lib_basicFileFunctions */
+                       $basicFileFunctions = t3lib_div::makeInstance('t3lib_basicFileFunctions');
+                       
                        $meaningfulPrefix = implode('_', array_merge($this->combinedTextStrings, $this->combinedFileNames));
-                               // Convert raw string to a nice ASCII-only string without spaces
-                       $meaningfulPrefix = $GLOBALS['TSFE']->csConvObj->specCharsToASCII($GLOBALS['TSFE']->renderCharset, $meaningfulPrefix);
-                       $meaningfulPrefix = str_replace(' ', '_', $meaningfulPrefix);
+                       $meaningfulPrefix = $basicFileFunctions->cleanFileName($meaningfulPrefix);
                        $meaningfulPrefix = substr($meaningfulPrefix, 0, intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix'])) . '_';
                }