mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
make_clickable: When cleaning up accidental links within links, account for the tag being split by newlines.
props dd32. fixes #19028. Built from https://develop.svn.wordpress.org/trunk@26974 git-svn-id: http://core.svn.wordpress.org/trunk@26853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8ec592f244
commit
0ee1cb3046
@ -1742,7 +1742,7 @@ function make_clickable( $text ) {
|
||||
}
|
||||
|
||||
// Cleanup of accidental links within links
|
||||
$r = preg_replace( '#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );
|
||||
$r = preg_replace( '#(<a([ \r\n\t]+[^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user