[TYPO3-core] RFC Bug #10629: RTE transformation looses multiple classes on links on the way to the database

Stanislas Rolland typo3 at sjbr.ca
Sat Mar 7 05:04:12 CET 2009


Hi Steffen,
>> Solution:
>> Wrap the list of classes with quotes.
> 
> sry for asking without testing:
> What does it mean, quotes are required? Does it work from normal link 
> field same way with manual enter the parameters?
> 
The quotes are not required. But if the class attributes specifies a 
list of classes, the second one will be used as title unless the class 
parameter of the link is quoted.

I am attaching a second version of the patch, so that the RTE 
transformation will quote the class parameter only if it contains a 
space. This insures that the link parameters will remain unquoted as 
they are today when there is only one class in the class attribute.

However, after doing some further tests, I found problems in 
t3lib_div::unQuoteFilenames. This function is working by accident:
1. if the class 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;
2. if the class parameter is quoted and contains spaces, the resulting 
array contains gaps, and typolink rendering/transformation fails: if 
present, the title attribute is forgotten; this may well impact other 
users of the function that expect a specific number/order of parameters.

I am attaching corrections to t3lib_div::unQuoteFilenames within the 
same patch. I tested it both inside the RTE (transformation of links) 
and outside (FE rendering of manually entered typolinks).

However, since this function is oddly named for the usage that is made 
of it, and since I do not know all other contexts in which it might be 
used, I would commit this patch to trunk only.

Regards,
Stan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: typo3core_bugfix_10629_trunk_v2.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090306/eafa6e6f/attachment.txt 


More information about the TYPO3-team-core mailing list