75377[BUGFIX] Allow UrlSoftReferenceParser to handle IDN
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 2
Review log 1825
-
Albrecht Köhnlein uploaded patch set 1 08/05/22, 20:17
-
Stefan Bürk commented on patch set 1 08/05/22, 20:28
-
core-ci voted on patch set 1 V -1 08/05/22, 20:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29851
-
Albrecht Köhnlein commented on patch set 1 08/05/22, 20:41
My solution was directly inspired by ExternalLinktype::preprocessUrl() [1] and also ather code uses the old parse_url() [2] So I did not see any benefit from using the `Uri` class, but if anyone would recommend to migrate my code, I would not have any problems to do it. https://github.com/TYPO3/typo3/blob/09d9c87b90c8675f8049d694e2ad9c785ae06dac/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php#L347 https://github.com/TYPO3/typo3/blob/8f39c70f9859d1cb80ea54f4ec2080fecf732ffa/typo3/sysext/core/Classes/Utility/GeneralUtility.php#L823 -
Albrecht Köhnlein commented on patch set 1 08/05/22, 20:49
UrlSoftReferenceParser.php:77ReplySorry, I failed properly use Gerrit. You find my answer below. -
Albrecht Köhnlein uploaded patch set 2 08/05/22, 21:19
-
Albrecht Köhnlein commented on patch set 2 08/05/22, 21:22
UrlSoftReferenceParser.php:77ReplyI now finally decided to keep parse_url() in the code. I think, it's the easiest and best maintainable solution, because HttpUtility::buildUrl() is dedicated to generate a URL from the parse_url() return array. -
core-ci voted on patch set 2 V +1 08/05/22, 21:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29861
-
Harry Glatz commented on patch set 2 V +1 08/23/22, 10:47
> Patch Set 2: Verified+1 > > Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29861 -
Sandra Erbel commented on patch set 2 V +1 08/23/22, 11:01
Cherry pick it to the latest main and latest 11.5 - works for both branches (versions) -
Albrecht Köhnlein commented on patch set 2 08/23/22, 18:20
Reply
Thanks for testing :-) -
Stefan Bürk commented on patch set 2 CR -1 08/23/22, 18:37
Thanks for the patch. Sadly I have to say that this patch has the one or other missassumption and thus not really working. See comments below. Will push another unit testcase to demonstrate the failing.UrlSoftReferenceParser.php:35Unresolved`$content` is not only a url. It can and mostly is text and even text with markup around it, so calling `convertIdnUrlToAscii()` fails to convert. Will comment that below in the methods.UrlSoftReferenceParser.php:70Unresolved$content is not only a url - so checking for examle a text with html markup and multiple links as valid url will fail, thus not calling the "splittin" (parse_url) which will also fail then. And even idn_to_ascii() do not support converting urls in a with text or markup surrounded string. See: https://3v4l.org/AJHJdUrlSoftReferenceParser.php:90Unresolved$content is not only a url - so checking for examle a text with html markup and multiple links as valid url will fail, thus not calling the "splittin" (parse_url) which will also fail then. And even idn_to_utf8() do not support converting urls in a with text or markup surrounded string. -
Stefan Bürk uploaded patch set 3 08/23/22, 18:38
-
Stefan Bürk commented on patch set 3 08/23/22, 18:42
Reply Unresolved
Reapplying -1 because of not working state. Having a fix for this issue is appreciated, but current solution do not work out. Maybe you or some else can comeup with another approach. Do not have one at hand right now.UrlSoftReferenceParser.php:77ReplyDone -
core-ci voted on patch set 3 V -1 08/23/22, 18:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30385
-
Benni Mack updated the commit message in patch set 4
V -105/03/23, 09:22 -
core-ci voted on patch set 4 V -1 05/03/23, 10:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41403
-
Benni Mack rebased onto patch set 5
V -105/07/23, 21:55 -
core-ci voted on patch set 5 V -1 05/07/23, 22:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41643
-
Benni Mack rebased onto patch set 6
V -106/11/24, 20:52 -
core-ci voted on patch set 6 V -1 06/11/24, 20:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59253
-
Benni Mack updated the commit message in patch set 7
V -110/18/24, 13:32 -
core-ci voted on patch set 7 V -1 10/18/24, 22:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67987
-
Sybille Peters wrote 10/20/24, 09:49
Removed cc Sybille Peters. -
Stefan Bürk abandoned the change 04/10/25, 07:50
The approach of this change is wrong and should also considered in a bigger scope/concept. Not sure how to make this working out of this approach, and due to inactivity and no reaction going to close this (change) now. However, the issue is still valid.
UrlSoftReferenceParser.php:77