Project

General

Profile

Actions

Bug #95878

open

In linkvalidator, soft reference parser extracts 2 links from rich text with URL as anchor text

Added by Sybille Peters about 3 years ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2021-11-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

This used to work fine. This seems to be not a bug in linkvalidator but due to a change in link parsing!

Reproduce

1. Create a CE (e.g. textmedia) and create a link in the bodytext (RTE) using an URL as link text (e.g. http://localhost/i-am-broken)
2. The generated code in RTE will be like <a href="http://localhost/i-am-broken">http://localhost/i-am-broken</a>
3. Execute "Check links" in "Info" > "Linkvalidator" > "Check links" tab

The problem does not occur, if it is just the URL in RTE, not with link markup:

Actual result

2 Broken link records will be displayed for this broken link

Expected result

Only one record should be displayed for 1 broken link.

Reason of problem

Since there are several softrefparsers for the field ($conf['softref'] = 'typolink_tag,email[subst],url') the text is parsed several times and if there is a match, this part is not removed (which it probably should).

Result:

$conf['softref'] = 'typolink_tag,email[subst],url'

<a href="https://blah">https://blah</a>

(1)
softReferenceParser
 parserKey=typolink_tag

 parserResult:
   matchstring=<a href="https://blah">
   type=external
   tokenValue=https://blah

(2)
 softReferenceParser
  parserKey=url

 parserResult:
    matchString=https://blah
    type=string
    value=https://blah


Files

linkvalidator_result.png (32 KB) linkvalidator_result.png Sybille Peters, 2024-03-15 07:46
linkvalidator_rte.png (11.4 KB) linkvalidator_rte.png Sybille Peters, 2024-03-15 07:46
linkvalidator_rte2.png (11.5 KB) linkvalidator_rte2.png Sybille Peters, 2024-03-15 07:51

Related issues 7 (2 open5 closed)

Related to TYPO3 Core - Bug #94920: "Register SoftReference parsers via DI breaks" breaks backendClosed2021-08-18

Actions
Related to TYPO3 Core - Bug #95449: Linkvalidator no longer detects broken links in pages.urlClosed2021-10-02

Actions
Related to TYPO3 Core - Task #94687: Deprecate SoftReferenceIndexClosed2021-08-02

Actions
Related to TYPO3 Core - Bug #95676: Broken external link count is wrongClosed2021-10-17

Actions
Related to TYPO3 Core - Bug #98120: Link parsing problem in linkvalidator Closed2022-08-10

Actions
Related to TYPO3 Core - Bug #98328: Exception "Data too long for column url" when checking links New2022-09-11

Actions
Related to TYPO3 Core - Bug #99909: False positive broken links by parsing URLs not inside <a> tagsNeeds Feedback2023-02-09

Actions
Actions

Also available in: Atom PDF