Bug #95878
openIn linkvalidator, soft reference parser extracts 2 links from rich text with URL as anchor text
0%
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