mirror of
https://github.com/mashirozx/sakura.git
synced 2025-05-29 01:49:21 +08:00
bug fix
This commit is contained in:
parent
8627909cd9
commit
75d54646e8
@ -952,6 +952,8 @@ function rt_add_link_target( $content ){
|
|||||||
foreach( $bits as $key=>$bit ){
|
foreach( $bits as $key=>$bit ){
|
||||||
// fix the target="_blank" bug after the link
|
// fix the target="_blank" bug after the link
|
||||||
if ( strpos( $bit, 'href' ) === false ) continue;
|
if ( strpos( $bit, 'href' ) === false ) continue;
|
||||||
|
// fix the target="_blank" bug in the codeblock
|
||||||
|
if ( strpos( preg_replace('/code([\s\S]*?)\/code[\s]*/m','temp',$content), $bit ) === false ) continue;
|
||||||
// find the end of each link
|
// find the end of each link
|
||||||
$pos = strpos( $bit, '>' );
|
$pos = strpos( $bit, '>' );
|
||||||
// check if there is an end (only fails with malformed markup)
|
// check if there is an end (only fails with malformed markup)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user