Page MenuHomePhabricator

D15777.id38010.diff
No OneTemporary

D15777.id38010.diff

diff --git a/src/applications/phriction/markup/PhrictionRemarkupRule.php b/src/applications/phriction/markup/PhrictionRemarkupRule.php
--- a/src/applications/phriction/markup/PhrictionRemarkupRule.php
+++ b/src/applications/phriction/markup/PhrictionRemarkupRule.php
@@ -104,6 +104,7 @@
foreach ($metadata as $spec) {
$link = $spec['link'];
+ $slug = PhabricatorSlug::normalize($link);
$name = $spec['explicitName'];
$class = 'phriction-link';
@@ -111,24 +112,24 @@
// in text as: "Title" <link>. Otherwise, we'll just render: <link>.
$is_interesting_name = (bool)strlen($name);
- if (idx($existant_documents, $link) === null) {
+ if (idx($existant_documents, $slug) === null) {
// The target document doesn't exist.
if ($name === null) {
- $name = explode('/', trim($link, '/'));
+ $name = explode('/', trim($slug, '/'));
$name = end($name);
}
$class = 'phriction-link-missing';
- } else if (idx($visible_documents, $link) === null) {
+ } else if (idx($visible_documents, $slug) === null) {
// The document exists, but the user can't see it.
if ($name === null) {
- $name = explode('/', trim($link, '/'));
+ $name = explode('/', trim($slug, '/'));
$name = end($name);
}
$class = 'phriction-link-lock';
} else {
if ($name === null) {
// Use the title of the document if no name is set.
- $name = $visible_documents[$link]
+ $name = $visible_documents[$slug]
->getContent()
->getTitle();

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 9, 7:38 PM (2 w, 1 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7390934
Default Alt Text
D15777.id38010.diff (1 KB)

Event Timeline