From 382bafa271ec49628e18a243b43f2f23efc33cca Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 22 Jun 2012 18:17:52 -0700 Subject: [PATCH] Don't treat links to redyoutube.com as YouTube Test Plan: `http://redyoutube.com/?v=1` Reviewers: tuomaspelkonen, epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2842 --- .../remarkup/markuprule/PhabricatorRemarkupRuleYoutube.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/markup/remarkup/markuprule/PhabricatorRemarkupRuleYoutube.php b/src/infrastructure/markup/remarkup/markuprule/PhabricatorRemarkupRuleYoutube.php index 4351b95d34..b23f049580 100644 --- a/src/infrastructure/markup/remarkup/markuprule/PhabricatorRemarkupRuleYoutube.php +++ b/src/infrastructure/markup/remarkup/markuprule/PhabricatorRemarkupRuleYoutube.php @@ -26,7 +26,7 @@ final class PhabricatorRemarkupRuleYoutube $this->uri = new PhutilURI($text); if ($this->uri->getDomain() && - preg_match('/youtube\.com$/', $this->uri->getDomain())) { + preg_match('/(^|\.)youtube\.com$/', $this->uri->getDomain())) { return $this->markupYoutubeLink(); }