escape 'http' inside code blocks so it doesn't trigger an oembed
This commit is contained in:
parent
973f15438a
commit
e2b6464f83
@ -1255,6 +1255,9 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
|
||||
$Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_unspacefy_and_trim', $Text);
|
||||
}
|
||||
|
||||
// replace escaped links in code= blocks
|
||||
$Text = str_replace('%eY9-!','http', $Text);
|
||||
|
||||
$Text = preg_replace('/\[\&\;([#a-z0-9]+)\;\]/', '&$1;', $Text);
|
||||
|
||||
// fix any escaped ampersands that may have been converted into links
|
||||
|
@ -2986,6 +2986,8 @@ function text_highlight($s, $lang) {
|
||||
else
|
||||
$o = $s;
|
||||
|
||||
$o = str_replace('http','%eY9-!',$o);
|
||||
|
||||
return('<code>' . $o . '</code>');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user