Project

General

Profile

Bug #95878

Updated by Sybille Peters 8 months ago

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

 h2. Reproduce 

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


 !linkvalidator_rte.png! 

 h2. Actual result 

 2 Broken link records will be displayed for this broken link 

 !linkvalidator_result.png! !linkvalidator_notes.txt! 

 h2. Expected result 

 Only one record should be displayed for 1 broken link. 

 h2. 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: 

 <pre> 
 $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 
 
 </pre>

Back