[TYPO3-core] JumpUrl restructuring

Alexander Stehlik alexander.stehlik at gmail.com
Sun Sep 29 22:53:12 CEST 2013


Hallo again,

while thinking about this a bit more another question came to my mind 
concerning the getPublicUrl() method of a FAL file / directory.

Should this method not URL encode special characters in the file path 
and filename? As far as I can see this should be done in the LocalDriver 
class. I mean, this method is supposed to return a valid URL, right?

Maybe the snippet from the jump URL links can be reused to do that since 
it seems to work quite good:

str_replace('%2F', '/', rawurlencode($fileUrl));

If you think this makes sense I'll open a new issue for that in forge.

Kind regards,
Alex

Am 26.09.2013 17:09, schrieb Alexander Stehlik:
> Hi Guys,
>
> in the last couple of days I spent some time looking into the jump URL
> feature. Originally I intended to supply a patch for
> http://forge.typo3.org/issues/52156 but I e ended up creating a new
> JumpUrlUtility class for bringing all the JumpUrl functionality in one
> place.
>
> The good thing about this rewrite is, that all places where jump URLs
> can be configured the same options are available. This was not always
> the case in the old integration.
>
> Another issue is tackled with this patch. When creating file links with
> the typoLink method the parameter that was expected needed to be created
> in a very special way so that everything works properly:
>
> str_replace('%2F', '/', $fileUrl);
>
> This is not very convenient. The new version simply expects a
> rawurlencoded version of the file URL which can be called by stdWrap. It
> will also make sure that files with special characters that are linked
> using their FAL UID will work (which is currently not always the case).
>
> I created a bunch of Unit Tests to make sure the system behaves the same
> before and after the patch. You can use the ContentObjectRendererTest
> class to test an unpatched master. The tests will be cleaned so that
> they only work in the patchted version when you are finished testing :)
>
> Would be great to get some feedback and hints for improvements or
> further tests.
>
> Cheers,
> Alex
>



More information about the TYPO3-team-core mailing list