From f4b530e0654e00bb72f241e59780d1dd4eb4ca47 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Wed, 24 Mar 2004 14:39:50 +0000 Subject: [PATCH] Restrict [img] back to three standard img formats ... this'll annoy dynamic img users but tough, damn nuisance anyway git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4872 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index df4b8789c2..8a5b1f6460 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -281,7 +281,7 @@ function bbencode_first_pass($text, $uid) $text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text); // [img]image_url_here[/img] code.. - $text = preg_replace("#\[img\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); + $text = preg_replace("#\[img\]((ht|f)tp://)(.*?\.(gif|jpeg|jpg|png))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); // Remove our padding from the string.. return substr($text, 1);;