diff --git a/src/infrastructure/markup/PhabricatorMarkupEngine.php b/src/infrastructure/markup/PhabricatorMarkupEngine.php index fd03ef3178..c626e9e055 100644 --- a/src/infrastructure/markup/PhabricatorMarkupEngine.php +++ b/src/infrastructure/markup/PhabricatorMarkupEngine.php @@ -383,6 +383,8 @@ final class PhabricatorMarkupEngine { } } + $rules[] = new PhutilRemarkupRuleDocumentLink(); + if ($options['fileproxy']) { $rules[] = new PhabricatorRemarkupRuleProxyImage(); } diff --git a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleProxyImage.php b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleProxyImage.php index 28519c8b67..4d2f3af0a6 100644 --- a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleProxyImage.php +++ b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleProxyImage.php @@ -24,7 +24,7 @@ final class PhabricatorRemarkupRuleProxyImage public function apply($text) { - $filetypes = '(?:\.jpe?g|.png|.gif)'; + $filetypes = '\.(?:jpe?g|png|gif)'; $text = preg_replace_callback( '@[<](\w{3,}://.+?'.$filetypes.')[>]@',