Project

General

Profile

Bug #95878

Updated by Sybille Peters about 2 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 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 


 !linkvalidator_rte.png! 


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

 !linkvalidator_rte2.png! 


 h2. Actual result 

 2 Broken link records will be displayed for this broken link 

 !linkvalidator_result.png! 

 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