diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 28a2d8fbe0..eb23edef55 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -150,7 +150,8 @@ p,ul,td {font-size:10pt;}
  • Fixed missing default constraints for post table under MSSQL
  • Fixed incorrect field size for forum pruning - preventing days > 256
  • Fixed continuing redirect issues for broken web servers, e.g. IIS+CGI PHP
  • -
  • +
  • Fixed inability to use ftp as a protocol for the [img] tag
  • +
  • Fixed incorrect handling of [img] tags containing %20 encoded spaces
  • diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 49fef9f9ad..e074faa88a 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -282,7 +282,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\](http://)([^ \r\n\t<\"]*?)\[/img\]#si", "[img:$uid]\\1\\2[/img:$uid]", $text); + $text = preg_replace("#\[img\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); // Remove our padding from the string.. return substr($text, 1);;