Page MenuHomePhorge

D25082.1734697694.diff
No OneTemporary

D25082.1734697694.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -10,7 +10,7 @@
'conpherence.pkg.css' => '0e3cf785',
'conpherence.pkg.js' => '020aebcf',
'core.pkg.css' => 'f538846d',
- 'core.pkg.js' => '6a2c22c2',
+ 'core.pkg.js' => '66c49ca1',
'dark-console.pkg.js' => '187792c2',
'differential.pkg.css' => '609e63d4',
'differential.pkg.js' => 'c60bec1b',
@@ -257,7 +257,7 @@
'rsrc/externals/javelin/lib/URI.js' => '2e255291',
'rsrc/externals/javelin/lib/Vector.js' => 'e9c80beb',
'rsrc/externals/javelin/lib/WebSocket.js' => 'fdc13e4e',
- 'rsrc/externals/javelin/lib/Workflow.js' => 'd7ba6915',
+ 'rsrc/externals/javelin/lib/Workflow.js' => 'cc1553f3',
'rsrc/externals/javelin/lib/__tests__/Cookie.js' => 'ca686f71',
'rsrc/externals/javelin/lib/__tests__/DOM.js' => '4566e249',
'rsrc/externals/javelin/lib/__tests__/JSON.js' => '710377ae',
@@ -265,7 +265,7 @@
'rsrc/externals/javelin/lib/__tests__/behavior.js' => '8426ebeb',
'rsrc/externals/javelin/lib/behavior.js' => '1b6acc2a',
'rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js' => '89a1ae3a',
- 'rsrc/externals/javelin/lib/control/typeahead/Typeahead.js' => 'd96e47a4',
+ 'rsrc/externals/javelin/lib/control/typeahead/Typeahead.js' => '0507519c',
'rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js' => 'a241536a',
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadCompositeSource.js' => '22ee68a5',
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadOnDemandSource.js' => '23387297',
@@ -423,7 +423,7 @@
'rsrc/js/application/projects/WorkboardCard.js' => '0392a5d8',
'rsrc/js/application/projects/WorkboardCardTemplate.js' => '84f82dad',
'rsrc/js/application/projects/WorkboardColumn.js' => 'c3d24e63',
- 'rsrc/js/application/projects/WorkboardController.js' => 'b9d0c2f3',
+ 'rsrc/js/application/projects/WorkboardController.js' => '7474d31f',
'rsrc/js/application/projects/WorkboardDropEffect.js' => '8e0aa661',
'rsrc/js/application/projects/WorkboardHeader.js' => '111bfd2d',
'rsrc/js/application/projects/WorkboardHeaderTemplate.js' => 'ebe83a6b',
@@ -453,7 +453,7 @@
'rsrc/js/core/DragAndDropFileUpload.js' => '4370900d',
'rsrc/js/core/DraggableList.js' => '0169e425',
'rsrc/js/core/Favicon.js' => '7930776a',
- 'rsrc/js/core/FileUpload.js' => 'ab85e184',
+ 'rsrc/js/core/FileUpload.js' => '331676ea',
'rsrc/js/core/Hovercard.js' => '6199f752',
'rsrc/js/core/HovercardList.js' => 'de4b4919',
'rsrc/js/core/KeyboardShortcut.js' => '1a844c06',
@@ -731,7 +731,7 @@
'javelin-sound' => 'd4cc2d2a',
'javelin-stratcom' => '0889b835',
'javelin-tokenizer' => '89a1ae3a',
- 'javelin-typeahead' => 'd96e47a4',
+ 'javelin-typeahead' => '0507519c',
'javelin-typeahead-composite-source' => '22ee68a5',
'javelin-typeahead-normalizer' => 'a241536a',
'javelin-typeahead-ondemand-source' => '23387297',
@@ -751,12 +751,12 @@
'javelin-workboard-card' => '0392a5d8',
'javelin-workboard-card-template' => '84f82dad',
'javelin-workboard-column' => 'c3d24e63',
- 'javelin-workboard-controller' => 'b9d0c2f3',
+ 'javelin-workboard-controller' => '7474d31f',
'javelin-workboard-drop-effect' => '8e0aa661',
'javelin-workboard-header' => '111bfd2d',
'javelin-workboard-header-template' => 'ebe83a6b',
'javelin-workboard-order-template' => '03e8891f',
- 'javelin-workflow' => 'd7ba6915',
+ 'javelin-workflow' => 'cc1553f3',
'maniphest-report-css' => '3d53188b',
'maniphest-task-edit-css' => '272daa84',
'maniphest-task-summary-css' => '61d1667e',
@@ -787,7 +787,7 @@
'phabricator-fatal-config-template-css' => 'e689dbbd',
'phabricator-favicon' => '7930776a',
'phabricator-feed-css' => 'd8b6e3f8',
- 'phabricator-file-upload' => 'ab85e184',
+ 'phabricator-file-upload' => '331676ea',
'phabricator-flag-css' => '2b77be8d',
'phabricator-keyboard-shortcut' => '1a844c06',
'phabricator-keyboard-shortcut-manager' => '81debc48',
@@ -965,6 +965,12 @@
'javelin-dom',
'javelin-workflow',
),
+ '0507519c' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'javelin-vector',
+ 'javelin-util',
+ ),
'05d290ef' => array(
'javelin-install',
'javelin-util',
@@ -1207,6 +1213,11 @@
'javelin-stratcom',
'javelin-dom',
),
+ '331676ea' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'phabricator-notification',
+ ),
34450586 => array(
'javelin-color',
'javelin-install',
@@ -1589,6 +1600,16 @@
'javelin-behavior',
'javelin-dom',
),
+ '7474d31f' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'javelin-util',
+ 'javelin-vector',
+ 'javelin-stratcom',
+ 'javelin-workflow',
+ 'phabricator-drag-and-drop-file-upload',
+ 'javelin-workboard-board',
+ ),
'78bc5d94' => array(
'javelin-behavior',
'javelin-uri',
@@ -1856,11 +1877,6 @@
'javelin-json',
'phuix-form-control-view',
),
- 'ab85e184' => array(
- 'javelin-install',
- 'javelin-dom',
- 'phabricator-notification',
- ),
'ac10c917' => array(
'javelin-behavior',
'javelin-dom',
@@ -1983,16 +1999,6 @@
'javelin-uri',
'phabricator-notification',
),
- 'b9d0c2f3' => array(
- 'javelin-install',
- 'javelin-dom',
- 'javelin-util',
- 'javelin-vector',
- 'javelin-stratcom',
- 'javelin-workflow',
- 'phabricator-drag-and-drop-file-upload',
- 'javelin-workboard-board',
- ),
'bf159129' => array(
'phui-inline-comment-view-css',
),
@@ -2034,6 +2040,17 @@
'javelin-workflow',
'javelin-json',
),
+ 'cc1553f3' => array(
+ 'javelin-stratcom',
+ 'javelin-request',
+ 'javelin-dom',
+ 'javelin-vector',
+ 'javelin-install',
+ 'javelin-util',
+ 'javelin-mask',
+ 'javelin-uri',
+ 'javelin-routable',
+ ),
'cc2c5de5' => array(
'javelin-install',
'phuix-button-view',
@@ -2063,17 +2080,6 @@
'd4cc2d2a' => array(
'javelin-install',
),
- 'd7ba6915' => array(
- 'javelin-stratcom',
- 'javelin-request',
- 'javelin-dom',
- 'javelin-vector',
- 'javelin-install',
- 'javelin-util',
- 'javelin-mask',
- 'javelin-uri',
- 'javelin-routable',
- ),
'd7d3ba75' => array(
'javelin-dom',
'javelin-util',
@@ -2094,12 +2100,6 @@
'javelin-util',
'phabricator-shaped-request',
),
- 'd96e47a4' => array(
- 'javelin-install',
- 'javelin-dom',
- 'javelin-vector',
- 'javelin-util',
- ),
'da15d3dc' => array(
'phui-oi-list-view-css',
),
diff --git a/src/infrastructure/markup/markuprule/PhutilRemarkupDocumentLinkRule.php b/src/infrastructure/markup/markuprule/PhutilRemarkupDocumentLinkRule.php
--- a/src/infrastructure/markup/markuprule/PhutilRemarkupDocumentLinkRule.php
+++ b/src/infrastructure/markup/markuprule/PhutilRemarkupDocumentLinkRule.php
@@ -45,11 +45,11 @@
$engine = $this->getEngine();
$is_anchor = false;
- if (strncmp($link, '/', 1) == 0) {
+ if ($this->isURIRelativePath($link)) {
$base = phutil_string_cast($engine->getConfig('uri.base'));
$base = rtrim($base, '/');
$link = $base.$link;
- } else if (strncmp($link, '#', 1) == 0) {
+ } else if ($this->isURIAnchor($link)) {
$here = $engine->getConfig('uri.here');
$link = $here.$link;
diff --git a/src/infrastructure/markup/markuprule/PhutilRemarkupRule.php b/src/infrastructure/markup/markuprule/PhutilRemarkupRule.php
--- a/src/infrastructure/markup/markuprule/PhutilRemarkupRule.php
+++ b/src/infrastructure/markup/markuprule/PhutilRemarkupRule.php
@@ -106,4 +106,28 @@
return (strpos($text, PhutilRemarkupBlockStorage::MAGIC_BYTE) === false);
}
+ /**
+ * Check whenever an URI is an anchor
+ *
+ * @param string $uri
+ * @return bool
+ */
+ protected function isURIAnchor($uri) {
+ return strncmp($uri, '#', 1) == 0;
+ }
+
+ /**
+ * Is this URI a relative pathname
+ *
+ * @param string $uri Example '/path' etc.
+ * @return string
+ */
+ protected function isURIRelativePath($uri) {
+ // NOTE: This was the original check, but at
+ // the moment '/' is assumed as relative but
+ // './' is assumed as not relative, and this
+ // may be confusing and may deserve a future update
+ return strncmp($uri, '/', 1) == 0;
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 12:28 (20 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1017549
Default Alt Text
D25082.1734697694.diff (8 KB)

Event Timeline