diff --git a/src/applications/pholio/remarkup/PholioRemarkupRule.php b/src/applications/pholio/remarkup/PholioRemarkupRule.php --- a/src/applications/pholio/remarkup/PholioRemarkupRule.php +++ b/src/applications/pholio/remarkup/PholioRemarkupRule.php @@ -25,6 +25,10 @@ $href = $href.'/'.$id[1].'/'; } + if ($this->getEngine()->getConfig('uri.full')) { + $href = PhabricatorEnv::getURI($href); + } + return $href; } diff --git a/src/infrastructure/markup/PhabricatorMarkupEngine.php b/src/infrastructure/markup/PhabricatorMarkupEngine.php --- a/src/infrastructure/markup/PhabricatorMarkupEngine.php +++ b/src/infrastructure/markup/PhabricatorMarkupEngine.php @@ -42,7 +42,7 @@ private $objects = array(); private $viewer; private $contextObject; - private $version = 14; + private $version = 15; /* -( Markup Pipeline )---------------------------------------------------- */ @@ -337,6 +337,7 @@ public static function newPhameMarkupEngine() { return self::newMarkupEngine(array( 'macros' => false, + 'uri.full' => true, )); } @@ -349,7 +350,6 @@ array( 'macros' => false, 'youtube' => false, - )); } @@ -437,6 +437,7 @@ 'macros' => true, 'uri.allowed-protocols' => PhabricatorEnv::getEnvConfig( 'uri.allowed-protocols'), + 'uri.full' => false, 'syntax-highlighter.engine' => PhabricatorEnv::getEnvConfig( 'syntax-highlighter.engine'), 'preserve-linebreaks' => true, @@ -464,6 +465,8 @@ 'syntax-highlighter.engine', $options['syntax-highlighter.engine']); + $engine->setConfig('uri.full', $options['uri.full']); + $rules = array(); $rules[] = new PhutilRemarkupEscapeRemarkupRule(); $rules[] = new PhutilRemarkupMonospaceRule(); diff --git a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php --- a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php +++ b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php @@ -44,7 +44,13 @@ PhabricatorObjectHandle $handle, $id) { - return $handle->getURI(); + $uri = $handle->getURI(); + + if ($this->getEngine()->getConfig('uri.full')) { + $uri = PhabricatorEnv::getURI($uri); + } + + return $uri; } protected function renderObjectRefForAnyMedia (