Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15336564
D15777.id38010.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15777.id38010.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D15777: Normalize Phriction links when looking them up in remarkup
Attached
Detach File
Event Timeline
Log In to Comment