}
// Hook completed and did not return a valid feed item
- $title = Title::makeTitle( intval( $row->page_namespace ), $row->page_title );
- if ( $title && $title->userCan( 'read', $this->getUser() ) ) {
+ $title = Title::makeTitle( (int)$row->page_namespace, $row->page_title );
+ $user = $this->getUser();
+
+ if ( $title && $this->getPermissionManager()->userCan( 'read', $user, $title ) ) {
$date = $row->rev_timestamp;
$comments = $title->getTalkPage()->getFullURL();
$revision = $this->revisionStore->newRevisionFromRow( $row );
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.