[TYPO3-core] RFC Bug #10629: class and title parameters of typolinks get broken

Stanislas Rolland typo3 at sjbr.ca
Tue Mar 30 22:13:19 CEST 2010


REMINDER #1

Stanislas Rolland a écrit :
> This year+ old issue with 4 related bugtracker entries was partially 
> fixed by an unrelated fix to t3lib_div.
> 
> So, here is a new version of the patch against trunk revision 7139. The 
> patch will also apply to branch TYPO3_4-3.
> 
> How to test:
> This is easy to test with the link wizard. Use the link wizard to set a 
> link and specify two class names in the class field of the wizard 
> window. Before the patch is applied, the second class will become the 
> title of the link. Other problems will occur if the title contains 
> spaces. The patch fixes these issues by having the browse_links class 
> use the same function as fe rendering for exploding the link parameters, 
> and by quoting the typolink class and title parameters if they contain 
> spaces. This is correctly rendered in FE.
> 
> Not so easy to test in the RTE, because the link dialogue does not 
> currently allow to set more than one class on a link. But, in text mode 
> you may easily add a second classname to the class attribute of a link 
> and see the result of the RTE transformation.
> 
> Regards,
> Stanislas
> 
> 
> 
> 
> 
> Stanislas Rolland a écrit :
>> This is a retitled and revised SVN patch request.
>>
>> Type:
>> Bugfix
>>
>> Problems:
>>
>> 1. link wizard: if the title parameter contains whitespaces and you 
>> try to update the link with the link wizard, anything following the 
>> first whitespace of the title is lost;
>>
>> 2. neither link wizard nor RTE transformation honour multiple classes 
>> on class attribute of TYPO3 link tag or class parameter of typolink;
>>
>> 3. t3lib_div::unQuoteFilenames: this function used by RTE 
>> transformation and typolink FE rendering is working by accident:
>>
>> 3a. if a parameter of the typolink is quoted but does not contain a 
>> space, the output of the function is erratic; any quoted parameter 
>> that does not contain a space will make the function produce wrong 
>> results;
>>
>> 3b. if a parameter is quoted and contains spaces, the returned array 
>> contains gaps, and typolink rendering/transformation fails: parts of 
>> the title attribute may be forgotten; this may well impact other users 
>> of the function that expect a specific number/order of parameters.
>>
>> 4. The link wizard uses t3lib_trimExplode instead of 
>> t3lib_div::unQuoteFilenames and therefore breaks any current title or 
>> list of classes.
>>
>> Solution:
>> 1. Fix t3lib_div::unQuoteFilenames.
>>
>> 2. link wizard: use t3lib_div::unQuoteFilenames.
>>
>> 3. In link wizard and RTE transformation: wrap the class parameter 
>> with quotes if it contains whitespaces.
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=10629
>> http://bugs.typo3.org/view.php?id=10349
>>
>> Branches:
>> trunk
>>
>> Regards,
>> Stanislas
>>
> 



More information about the TYPO3-team-core mailing list