[TYPO3-core] RFC #9632: Bug: Multiple fileuploads into folders with special characters (umlauts) not possible

Marcus Krause marcus at t3sec.info
Wed Oct 29 22:21:39 CET 2008


Martin Kutschker schrieb:
> Marcus Krause schrieb:
>> This is an SVN patch request.
>>
>> Type: Bugfix
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=9632
>>
>> Branches:
>> TYPO3_4-1 & TYPO3_4-2 & trunk
>>
>> Problem:
>> JS function escape() is used to escape target-url parameter for a page
>> reload when choosing multiple fileupload. Escape() is known to not be
>> able to handle unicode characters.
>>
>> Solution:
>> Replace JS function escape() by encodeURIComponent().
>>
>> Notes:
>> Tested successfully on a utf-8 BE with FF, IE and Opera.
> 
> Please test with iso-8859-1. It' break because you only change the
> encoding but not the decoding. encodeURIComponent() will turn it's
> argument to utf-8, so you must revert this recoding on the receiving
> end. decodeURIComponent() in JS will do that for you, but in PHP you
> must do this manually.

I've now tested it on iso-8859-1 with FF, IE and Opera. Creation of
folders with german umlauts will only work on a utf8 backend AND enabled
['SYS']['UTF8filesystem'] config. So no umlauts will occur on a latin1
BE. After testing, there's no limitation of functionality introduced
with encodeURIComponent() usage. So I'm unsure if we really need to
unescape the targetURL/returnURL parameters afterwards.

In addition, in the original version of typo3/file_newfolder.php
escape() is applied to returnURL parameter whereas in typo3/file_upload
no JS function is applied to returnURL but php function
htmlspecialchars. This seems somehow inconsistent.

Marcus.


More information about the TYPO3-team-core mailing list