#97937Linkvalidator: Links and in tt_content.bodytext cause problems in UrlSoftReferenceParser
Description
In our test case, we have a content element with CType = textmedia and the following data in the bodytext field:
<p>lorem ipsum https://weber.digital dolor sit amet</p>
<p><strong>Used Fonts and Iconfonts</strong><br /> Museo Sans Rounded Family OTF (<a class="external" href="https://www.myfonts.com">https://www.myfonts.com</a>)<br /> Droid Serif (<a class="external" href="https://www.fontsquirrel.com/fonts/droid-serif">https://www.fontsquirrel.com/fonts/droid-serif</a>)<br /> Icons Mind (<a class="external" href="https://iconsmind.com">https://iconsmind.com</a>)<br /> Linear Icons Free (<a class="external" href="https://linearicons.com">https://linearicons.com</a>) (CC BY-SA 4.0) by Perxis (<a class="external" href="https://perxis.com">https://perxis.com</a>)</p>
When the linkvalidator executes the UrlSoftReferenceParser, it finds two broken links:
- https://weber.digital
</a>)<br /> Linear Icons Free (<a class="external" href="https://linearicons.com"
So according to this test, the UrlSoftReferenceParser does not handle correctly and also has a bug in the big regex, which does all the parsing.
Reviews 3
Related issues 4
History 828
Show 03 earlier messages
-
Gerrit Code Review pushed patch set 1 for main to change 75200 status
NewUnder Review <span data-processor="relativetime" data-value="2022-07-15T22:11:45+00:00" > 07/15/22, 22:11 </span> -
Gerrit Code Review pushed patch set 2 for main to change 75200 <span data-processor="relativetime" data-value="2022-07-15T22:22:03+00:00" > 07/15/22, 22:22 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 75200 <span data-processor="relativetime" data-value="2022-07-15T22:50:56+00:00" > 07/15/22, 22:50 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 75200 <span data-processor="relativetime" data-value="2022-07-15T22:52:38+00:00" > 07/15/22, 22:52 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 75200 <span data-processor="relativetime" data-value="2022-07-31T00:58:40+00:00" > 07/31/22, 00:58 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 75200 <span data-processor="relativetime" data-value="2022-07-31T01:09:15+00:00" > 07/31/22, 01:09 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 75200 <span data-processor="relativetime" data-value="2022-07-31T20:27:24+00:00" > 07/31/22, 20:27 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 75200 <span data-processor="relativetime" data-value="2022-07-31T20:35:11+00:00" > 07/31/22, 20:35 </span>
-
Nikita Hovratov changed Related to #98120 <span data-processor="relativetime" data-value="2022-08-11T18:06:19+00:00" > 08/11/22, 18:06 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 75200 <span data-processor="relativetime" data-value="2022-08-12T20:03:39+00:00" > 08/12/22, 20:03 </span>
-
Sybille Peters changed Related to #98328 <span data-processor="relativetime" data-value="2022-09-11T08:23:29+00:00" > 09/11/22, 08:23 </span>
-
Sybille Peters commented <span data-processor="relativetime" data-value="2022-09-22T05:55:21+00:00" > 09/22/22, 05:55 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 75200 <span data-processor="relativetime" data-value="2023-05-03T09:22:06+00:00" > 05/03/23, 09:22 </span>
-
Gerrit Code Review pushed patch set 11 for main to change 75200 <span data-processor="relativetime" data-value="2023-05-03T12:39:05+00:00" > 05/03/23, 12:39 </span>
-
Gerrit Code Review pushed patch set 12 for main to change 75200 <span data-processor="relativetime" data-value="2023-07-20T00:00:12+00:00" > 07/20/23, 00:00 </span>
-
Gerrit Code Review pushed patch set 13 for main to change 75200 <span data-processor="relativetime" data-value="2023-07-29T21:22:32+00:00" > 07/29/23, 21:22 </span>
-
Sybille Peters changed Related to #99909 <span data-processor="relativetime" data-value="2023-08-13T06:28:51+00:00" > 08/13/23, 06:28 </span>
-
Gerrit Code Review pushed patch set 14 for main to change 75200 <span data-processor="relativetime" data-value="2023-11-22T22:11:52+00:00" > 11/22/23, 22:11 </span>
-
Gerrit Code Review pushed patch set 15 for main to change 75200 <span data-processor="relativetime" data-value="2023-11-22T22:19:21+00:00" > 11/22/23, 22:19 </span>
-
Gerrit Code Review pushed patch set 16 for main to change 75200 <span data-processor="relativetime" data-value="2024-01-06T22:35:14+00:00" > 01/06/24, 22:35 </span>
-
Gerrit Code Review pushed patch set 17 for main to change 75200 <span data-processor="relativetime" data-value="2024-01-24T23:41:48+00:00" > 01/24/24, 23:41 </span>
-
Ralf Hettinger changed Related to #85006 <span data-processor="relativetime" data-value="2024-03-20T15:43:38+00:00" > 03/20/24, 15:43 </span>
-
Gerrit Code Review pushed patch set 18 for main to change 75200 <span data-processor="relativetime" data-value="2024-10-18T14:07:34+00:00" > 10/18/24, 14:07 </span>
-
Josef Glatz commented <span data-processor="relativetime" data-value="2026-01-14T16:30:08+00:00" > 01/14/26, 16:30 </span>
Also TYPO3 13 seems to be affected by this problem.
-
Benni Mack changed status
Under ReviewNew <span data-processor="relativetime" data-value="2026-11-09T11:30:24+00:00" > 11/09/26, 11:30 </span> -
Gerrit Code Review pushed patch set 1 for main to change 97662 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-14T18:30:07+00:00" > 11/14/26, 18:30 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 97841 <span data-processor="relativetime" data-value="2026-11-19T10:35:30+00:00" > 11/19/26, 10:35 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-19T10:40:10+00:00" > 11/19/26, 10:40 </span>Applied in changeset commit:7037252cc07521e5e65f987f7b6ab932c116bc89.
Has anyone analyzed this further what actually causes the problem, what is affected and what is not and would work as a workaround ?
I have tested the following and it works – meaning the linkvalidator BE module will now show the broken links, but some of my workarounds are a bit brutal, so you should make sure, it is what you want.
Analysis
The affected texts mostly contained an URL as anchor text. When this was changed, the problem no longer existed.
Possible work-arounds
Solution 3 is the least invasive, it only affects link checking, the other 2 also change the content / behaviour of TYPO3 in general.
1. If possible, do not use URLs as anchor texts. This has some disadavantages in general, so it might be a good idea in general:
As makeshift solution, the URL in the anchor text can be converted to an URL without scheme, e.g.
2. Do not parse the rich texts with softref “url”.
This can be disabled entirely ( !!!which will also result in URLs that are displayed as links no longer being displayed as URLs, so make sure this is what you want!!! ).
e.g.
Configuration/TCA/Overrides/tt_content.php
$GLOBALS[‘TCA’][‘tt_content’][‘columns’][‘bodytext’][‘config’][‘softref’] = preg_replace(‘#(,|^)url(,|$)#’, ‘’,
$GLOBALS[‘TCA’][‘tt_content’][‘columns’][‘bodytext’][‘config’][‘softref’]);
which results in:
3. Or it can be disabled only when parsing with linkvalidator (and leaving the rest intact) by patching linkvalidator/Classes/LinkAnalyzer::analyzeRecord(). But this way it will only check links, not standalone URLs.