- if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) )
- $string = wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols ) . trim( $string2[1] );
+ if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) ) {
+ $string = trim( $string2[1] );
+ $protocol = wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols );
+ if ( 'feed:' == $protocol ) {
+ if ( $count > 2 )
+ return '';
+ $string = wp_kses_bad_protocol_once( $string, $allowed_protocols, ++$count );
+ if ( empty( $string ) )
+ return $string;
+ }
+ $string = $protocol . $string;
+ }