aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-29 20:07:26 -0700
committerzotlabs <mike@macgirvin.com>2017-08-29 20:07:26 -0700
commite2b6464f83313bd56c2d9c962e089d978927cdfd (patch)
tree5ee7d718d69fcc11076db09cd18879785928ebb8 /include/bbcode.php
parent973f15438adb44f50e01807013b3f23e25bda2c8 (diff)
downloadvolse-hubzilla-e2b6464f83313bd56c2d9c962e089d978927cdfd.tar.gz
volse-hubzilla-e2b6464f83313bd56c2d9c962e089d978927cdfd.tar.bz2
volse-hubzilla-e2b6464f83313bd56c2d9c962e089d978927cdfd.zip
escape 'http' inside code blocks so it doesn't trigger an oembed
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 9f9b5c5e1..470854f06 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -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('/\[\&amp\;([#a-z0-9]+)\;\]/', '&$1;', $Text);
// fix any escaped ampersands that may have been converted into links