From 7601ce7de747dcffdb63be027ed8b8327e0b6e41 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 15 Jun 2011 03:41:28 -0700 Subject: [PATCH] iframes --- include/bbcode.php | 1 + include/html2bbcode.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/bbcode.php b/include/bbcode.php index a44838c246..40f4935fba 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -97,6 +97,7 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '', $Text); + $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/", '', $Text); // [img=widthxheight]image source[/img] $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/", '', $Text); diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 734282d95c..d4e8cce666 100644 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -35,6 +35,7 @@ function html2bbcode($s) { '/\(.*?)\<\/blockquote\>/is', '/\(.*?)\<\/video\>/is', '/\(.*?)\<\/audio\>/is', + '/\(.*?)\<\/iframe\>/is', ); @@ -60,6 +61,7 @@ function html2bbcode($s) { '[quote]$1[/quote]', '[video]$1[/video]', '[audio]$1[/audio]', + '[iframe]$1[/iframe]', ); // Replace $htmltags in $text with $bbtags