[TYPO3-core] FYI #16795: t3lib_div::unQuoteFilenames fails to detect quotes properly

Steffen Kamper info at sk-typo3.de
Wed Dec 22 16:09:01 CET 2010


Hi,

Am 22.12.2010 15:54, schrieb Stanislas Rolland:
> Hi François,
>>
>>> Be aware that t3lib_div::unQuoteFilenames is also used by
>>> tslib_cObj::typoLink and by t3lib_parsehtml_proc::TS_links_rte to
>>> explode typolink parameters. Please make sure these are not broken
>>> especially when the class parameter is quoted and contains multiple
>>> classes separated by spaces, and/or when the title parameter contains
>>> spaces and/or quotes.
>>
>> Wouldn't it make sense to duplicate the method in such a case? It really
>> doesn't feel good to have a method called "unQuoteFilenames" that is
>> used to parsing some specific string syntax. I would be much more at
>> ease to have a separate "parseTypolinkParameters" method or some similar
>> name, even if - at first - it is a simple copy of "unQuoteFilenames".
>> They could then evolve separately, which seems much safer to me. What do
>> you think?
>>
> Indeed the method is very badly named. But it does for typolink exactly
> the same as it does for IM/GM: parse space-separated parameters that may
> contain spaces when quoted.
>

maybe we should add a comment in phpDoc of this function where it is 
used, as it's obviously not for filenames only :)

Stan, did you observed any problems? After the fix and the unit tests it 
should be cleaner than before. The tests also reflect no change of 
behaviour.

vg Steffen


More information about the TYPO3-team-core mailing list