jenkins-bot has submitted this change and it was merged.

Change subject: Expand anchors to full URL on server rendering
......................................................................


Expand anchors to full URL on server rendering

This fixes bug 72490 and any similar issues where we're doing:

[$1 text of link]

but $1 is not a fully qualified URL.

There is a bug (bug 66746) to provide i18n support so it can be done
without creating an external link (which the above does), but this
fixes the broken user experience in the meantime.

Bug: 72490
Change-Id: I615a1178be61ea911855e92a131dea980ef27554
---
M includes/View.php
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Matthias Mullie: Looks good to me, approved
  EBernhardson: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/View.php b/includes/View.php
index b002862..e5e62a6 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -152,7 +152,15 @@
 
                array_walk_recursive( $apiResponse, function( &$value ) {
                        if ( $value instanceof Anchor ) {
+                               $anchor = $value;
                                $value = $value->toArray();
+
+                               // TODO: We're looking into another approach 
for this
+                               // using a parser function, so the URL doesn't 
have to be
+                               // fully qualified.
+                               // See 
https://bugzilla.wikimedia.org/show_bug.cgi?id=66746
+                               $value['url'] = $anchor->getFullURL();
+
                        } elseif ( $value instanceof Message ) {
                                $value = $value->text();
                        }

-- 
To view, visit https://gerrit.wikimedia.org/r/170785
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I615a1178be61ea911855e92a131dea980ef27554
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to