Bug #81173
closedGeneralUtility::isValidUrl should return false on t3:// links
0%
Updated by Benjamin Serfhos about 7 years ago
Due to url parsing changes in the core the GeneralUtility::isValidUrl() now also returns true on the new internal linking systems;
- t3://page
- t3://record
- t3://folder
- t3://file
In the LinkService this is done by if (stripos($urn, 't3://') === 0), which could be added to isValidUrl()
Updated by Susanne Moog about 4 years ago
- Status changed from New to Rejected
Why should it return false? isValidUrl is a validity check, if the given URL adheres to the general URL scheme. The t3:// URLs do so - as you can see from the tests, there are for example also telnet:// urls given as valid even though one might not have a telnet client / protocol handler registered on ones system. Those are actually two different things: Valid URL vs having a registered handler.
If you need to handle all kinds of URLs and want to make use of the TYPO3 resolving you can have a look at using the LinkService to do so.