Daniel Kinzler has uploaded a new change for review.
https://gerrit.wikimedia.org/r/246878
Change subject: Make the API consistently return the displaytitle as HTML.
......................................................................
Make the API consistently return the displaytitle as HTML.
MediaWiki core handles the displaytitle as pre-parsed HTML,
see I043b26b82f.
When falling back from displaytitle to the plain page title,
this needs to be taken into accounto.
FIXME: this only fixed the PHP side, the JavaScript code that
uses displaytitle still needs to be updated.
Change-Id: Id4ce93986a98c46d64bdf83c3b9448a8fee66d86
---
M includes/api/ApiMobileView.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/78/246878/1
diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php
index 54b2753..8ab7c0d 100644
--- a/includes/api/ApiMobileView.php
+++ b/includes/api/ApiMobileView.php
@@ -584,7 +584,7 @@
$data['pageprops'] = $parserOutput->getProperties();
} else {
$data['languagecount'] = 0;
- $data['displaytitle'] = $title->getPrefixedText();
+ $data['displaytitle'] = htmlspecialchars(
$title->getPrefixedText() );
$data['pageprops'] = array();
}
@@ -827,7 +827,7 @@
. 'all factors for logged-in users but
not blocked status for anons.',
' languagecount - number of languages that
the page is available in',
' hasvariants - whether or not the page is
available in other language variants',
- ' displaytitle - the rendered title of the
page, with {{DISPLAYTITLE}} and such applied',
+ ' displaytitle - HTML of the page title for
display, with {{DISPLAYTITLE}} and such applied',
' pageprops - page properties',
' description - page description from
Wikidata',
'contentmodel - page contentmodel'
--
To view, visit https://gerrit.wikimedia.org/r/246878
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4ce93986a98c46d64bdf83c3b9448a8fee66d86
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits