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

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

index e5fec8d..3bac2eb 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  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #17695: htmlArea RTE: Removing format may remove content
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'])) . '_';
                }