Only happens in disp=single/post
regular expression /https?:\/\/(www\.)?twitter\.com\/(#!\/)?@?([^\/\?]*)/
breaks by including " target="_blank" rel="nofollow">
// Get author's Twitter username
if( $creator_User = & $Item->get_creator_User() )
{
if( $twitter_links = $creator_User->userfield_values_by_code( 'twitter' ) )
{
preg_match( '/https?:\/\/(www\.)?twitter\.com\/(#!\/)?@?([^\/\?]*)/', $twitter_links[0], $matches );
if( isset( $matches[3] ) )
{
echo '<meta property="twitter:creator" content="@'.$matches[3].'" />'."\n";
}
}
}
Replace with: /https?:\/\/(www\.)?twitter\.com((?:\/\#!)?\/(\w+))/
// Get author's Twitter username
if( $creator_User = & $Item->get_creator_User() )
{
if( $twitter_links = $creator_User->userfield_values_by_code( 'twitter' ) )
{
preg_match( '/https?:\/\/(www\.)?twitter\.com((?:\/\#!)?\/(\w+))/', $twitter_links[0], $matches );
if( isset( $matches[3] ) )
{
echo '<meta property="twitter:creator" content="@'.$matches[3].'" />'."\n";
}
}
}
@achillis
Can you please specify where you are including
" target="_blank" rel="nofollow">
?