From 79d037fe668dbbe8d41f2669c5e934a801966781 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 29 Apr 2011 20:11:12 -0700 Subject: [PATCH] Use a stricter regexp in Diffusion remarkup Summary: Just minor bookkeeping, but the current regexp is too liberal and will match things which can't possibly be revision hashes. Test Plan: Typed things which should and shouldn't be revision links, they got handled properly. Reviewed By: aran Reviewers: jungejason, tuomaspelkonen, aran CC: aran Differential Revision: 185 --- .../markuprule/diffusion/PhabricatorRemarkupRuleDiffusion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/markup/remarkup/markuprule/diffusion/PhabricatorRemarkupRuleDiffusion.php b/src/infrastructure/markup/remarkup/markuprule/diffusion/PhabricatorRemarkupRuleDiffusion.php index 2b5651baa2..01a4385bf5 100644 --- a/src/infrastructure/markup/remarkup/markuprule/diffusion/PhabricatorRemarkupRuleDiffusion.php +++ b/src/infrastructure/markup/remarkup/markuprule/diffusion/PhabricatorRemarkupRuleDiffusion.php @@ -24,7 +24,7 @@ class PhabricatorRemarkupRuleDiffusion public function apply($text) { return preg_replace_callback( - '@\br([A-Z]+[a-z0-9]+)\b@', + '@\br([A-Z]+[a-f0-9]+)\b@', array($this, 'markupDiffusionLink'), $text); }