@@ -473,13 +473,13 @@ public function find_representative_item( $mf_array, $target, $ignore_hcards = t
473
473
'content ' === $ key &&
474
474
! empty ( $ value ['html ' ] ) &&
475
475
is_string ( $ value ['html ' ] ) &&
476
- preg_match_all ( '/<a\b [^>]*href\s*=\s*[" \']? ' . preg_quote ( $ target , '/ ' ) . '[" \']/i ' , $ value ['html ' ], $ context )
476
+ preg_match_all ( '/<a[^>]*href\s*=\s*[" \']? ' . preg_quote ( $ target , '/ ' ) . '[" \']? /i ' , $ value ['html ' ] )
477
477
) {
478
478
return $ item ;
479
479
} elseif (
480
480
'summary ' === $ key &&
481
481
is_string ( $ value ) &&
482
- preg_match_all ( '/<a\b [^>]*href\s*=\s*[" \']? ' . preg_quote ( $ target , '/ ' ) . '[" \']/i ' , $ value, $ context )
482
+ preg_match_all ( '/<a[^>]*href\s*=\s*[" \']? ' . preg_quote ( $ target , '/ ' ) . '[" \']? /i ' , $ value )
483
483
) {
484
484
return $ item ;
485
485
}
@@ -815,13 +815,13 @@ protected function get_response_type( $entry, $mf_array, $target ) {
815
815
'content ' === $ obj_key &&
816
816
! empty ( $ obj_value ['html ' ] ) &&
817
817
is_string ( $ obj_value ['html ' ] ) &&
818
- preg_match_all ( '/<a[^>]+ ? ' . preg_quote ( $ target , '/ ' ) . '[^>]*>([^>]+?)<\/a>/ i ' , $ obj_value ['html ' ], $ context )
818
+ preg_match_all ( '/<a[^>]*href\s*=\s*[" \' ] ? ' . preg_quote ( $ target , '/ ' ) . '[" \' ]?/ i ' , $ obj_value ['html ' ] )
819
819
) {
820
820
return $ classes [ $ key ];
821
821
} elseif (
822
822
'summary ' === $ obj_key &&
823
823
is_string ( $ obj_value ) &&
824
- preg_match_all ( '/<a[^>]+ ? ' . preg_quote ( $ target , '/ ' ) . '[^>]*>([^>]+?)<\/a>/ i ' , $ obj_value, $ context )
824
+ preg_match_all ( '/<a[^>]*href\s*=\s*[" \' ] ? ' . preg_quote ( $ target , '/ ' ) . '[" \' ]?/ i ' , $ obj_value )
825
825
) {
826
826
return $ classes [ $ key ];
827
827
}
0 commit comments