don't do oembed processing on naked links and smarty lib cleanup. ported from zap.

This commit is contained in:
Mario Vavti
2019-05-13 10:39:40 +02:00
parent 7465c79884
commit d5f59a57bf
3 changed files with 49 additions and 41 deletions

View File

@@ -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) {