From d5f59a57bf2689874f2171e0c4a2354d12597f34 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 13 May 2019 10:39:40 +0200 Subject: don't do oembed processing on naked links and smarty lib cleanup. ported from zap. --- include/bbcode.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 1c153677d..a675451f1 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -87,12 +87,11 @@ function nakedoembed($match) { $strip_url = strip_escaped_zids($url); - $o = oembed_fetch_url($strip_url); - - if ($o['type'] == 'error') - return str_replace($url,$strip_url,$match[0]); - - return '[embed]' . $strip_url . '[/embed]'; + // this function no longer performs oembed on naked links + // because they author may have created naked links intentionally. + // Now it just strips zids on naked links. + + return str_replace($url,$strip_url,$match[0]); } function tryzrlaudio($match) { -- cgit v1.2.3