Page MenuHomePhabricator

D12793.id30752.diff
No OneTemporary

D12793.id30752.diff

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 (

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 23, 2:26 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705683
Default Alt Text
D12793.id30752.diff (2 KB)

Event Timeline