X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFeedContributions.php;h=ed3b7b82688d79bb38e2169efe6a83f1b9bc9d78;hb=ba26cf3bf9c87d4b3cecb21765277dc0bd1c1b23;hp=9edf929f8eaf2f4cf5982cb56c5adddd08078e10;hpb=d55fb0791b2bb8a2ea9f34347f565efe730152d4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFeedContributions.php b/includes/api/ApiFeedContributions.php index 9edf929f8e..ed3b7b8268 100644 --- a/includes/api/ApiFeedContributions.php +++ b/includes/api/ApiFeedContributions.php @@ -137,7 +137,7 @@ class ApiFeedContributions extends ApiBase { } // Hook completed and did not return a valid feed item - $title = Title::makeTitle( intval( $row->page_namespace ), $row->page_title ); + $title = Title::makeTitle( (int)$row->page_namespace, $row->page_title ); if ( $title && $title->userCan( 'read', $this->getUser() ) ) { $date = $row->rev_timestamp; $comments = $title->getTalkPage()->getFullURL(); @@ -181,7 +181,7 @@ class ApiFeedContributions extends ApiBase { if ( $content instanceof TextContent ) { // only textual content has a "source view". - $html = nl2br( htmlspecialchars( $content->getNativeData() ) ); + $html = nl2br( htmlspecialchars( $content->getText() ) ); } else { // XXX: we could get an HTML representation of the content via getParserOutput, but that may // contain JS magic and generally may not be suitable for inclusion in a feed.