Apparently phpBB 3.2 no longer uses the HTML comments within the BBCode tags:
[attachment=1]IMG_*redacted*.jpg[/attachment]
[attachment=0]*redacted*_*redacted*.jpg[/attachment]
}, $text);
// convert attachments
- $text = preg_replace('~\[attachment=(\d+)\]<!-- ia\\1 -->.*?<!-- ia\\1 -->\[/attachment\]~', '', $text); // TODO: not supported right now
+ $text = preg_replace('~\[attachment=(\d+)\].*?\[/attachment\]~', '', $text); // TODO: not supported right now
// remove crap
$text = MessageUtil::stripCrap($text);