[ticket/14285] Fix regular expression

PHPBB3-14285
This commit is contained in:
rubencm 2021-03-21 23:20:51 +01:00
parent c375f2c9e5
commit f2914b2869

View file

@ -167,7 +167,7 @@ class helper
$content .= implode('<br />', $post_attachments);
// Convert attachments' relative path to absolute path
$pattern = '#(/app.php)/?download/attachment/#';
$pattern = '#(/app.php)?/download/attachment/#';
$replacement = $this->get_board_url() . '\1/download/attachment/';
$content = preg_replace($pattern, $replacement, $content);
}