Commit 42d39740 authored by Robert Nix's avatar Robert Nix

Merge branch 'update-mobilefrontend' into 'master'

Update MobileFrontend to latest REL1_31

See merge request !40
parents b6691c24 97c6b9f2
The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
......@@ -28,6 +28,7 @@ abstract class MobileSpecialPageFeed extends MobileSpecialPage {
* @param string $comment The raw comment text
* @param Title $title The title of the page that was edited
* @fixme: Duplication with SpecialMobileWatchlist
* @suppress SecurityCheck-DoubleEscaped phan false positive
*
* @return string HTML code
*/
......@@ -37,7 +38,7 @@ abstract class MobileSpecialPageFeed extends MobileSpecialPage {
} else {
$comment = Linker::formatComment( $comment, $title );
// flatten back to text
$comment = Sanitizer::stripAllTags( $comment );
$comment = htmlspecialchars( Sanitizer::stripAllTags( $comment ) );
}
return $comment;
}
......
......@@ -396,7 +396,7 @@ class SpecialMobileWatchlist extends MobileSpecialPageFeed {
if ( $comment !== '' ) {
$comment = Linker::formatComment( $comment, $title );
// flatten back to text
$comment = Sanitizer::stripAllTags( $comment );
$comment = htmlspecialchars( Sanitizer::stripAllTags( $comment ) );
}
return $comment;
}
......
( function ( M ) {
var user = M.require( 'mobile.startup/user' ),
/*
* Edit schema
* https://meta.wikimedia.org/wiki/Schema:Edit
*/
schemaEdit = new mw.eventLog.Schema(
'Edit',
mw.config.get( 'wgMFSchemaEditSampleRate' ),
{
'page.id': mw.config.get( 'wgArticleId' ),
'page.revid': mw.config.get( 'wgRevisionId' ),
'page.title': mw.config.get( 'wgPageName' ),
'page.ns': mw.config.get( 'wgNamespaceNumber' ),
'user.id': user.getId(),
'user.class': user.isAnon() ? 'IP' : undefined,
'user.editCount': mw.config.get( 'wgUserEditCount', 0 ),
'mediawiki.version': mw.config.get( 'wgVersion' ),
platform: 'phone',
integration: 'page',
version: 1
}
);
mw.trackSubscribe( 'mf.schemaEdit', function ( topic, data ) {
data['action.' + data.action + '.type'] = data.type;
delete data.type;
data['action.' + data.action + '.mechanism'] = data.mechanism;
delete data.mechanism;
// data['action.' + data.action + '.timing'] = Math.round( computeDuration( ... ) );
data['action.' + data.action + '.message'] = data.message;
delete data.message;
schemaEdit.log( data );
} );
}( mw.mobileFrontend ) );
( function ( M ) {
var context = M.require( 'mobile.startup/context' ),
/*
* MobileWebSearch schema
* https://meta.wikimedia.org/wiki/Schema:MobileWebSearch
*/
schemaMobileWebSearch = new mw.eventLog.Schema(
'MobileWebSearch',
// Sampled at 0.1% (consistent with the Desktop search rate)
1 / 1000,
/**
* @cfg {Object} defaults The options hash.
* @cfg {string} defaults.platform Always "mobileweb"
* @cfg {string} defaults.platformVersion The version of MobileFrontend
* that the user is using. One of "stable" or "beta"
*/
{
platform: 'mobileweb',
platformVersion: context.getMode()
}
);
mw.trackSubscribe( 'mf.schemaMobileWebSearch', function ( topic, data ) {
schemaMobileWebSearch.log( data );
} );
}( mw.mobileFrontend ) );
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment