jenkins-bot has submitted this change and it was merged.
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 account.
NOTE: this is technically a breaking change to the mobileview API,
though it really only removes an inconsistency.
Bug: T115747
Change-Id: Id4ce93986a98c46d64bdf83c3b9448a8fee66d86
---
M includes/api/ApiMobileView.php
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jdlrobson: Looks good to me, approved
Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
Niedzielski: Looks good to me, but someone else must approve
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: Id4ce93986a98c46d64bdf83c3b9448a8fee66d86
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Bgerstle <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Niedzielski <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits