'Bar in anchor'
);
- expectedSpecialCharacters = '<a title=""Who" wants to be a millionaire & live on 'Exotic Island'?" href="/wiki/%22Who%22_wants_to_be_a_millionaire_%26_live_on_%27Exotic_Island%27%3F">"Who" wants to be a millionaire & live on 'Exotic Island'?</a>';
+ expectedSpecialCharacters = '<a title=""Who" wants to be a millionaire & live on 'Exotic Island'?" href="/wiki/%22Who%22_wants_to_be_a_millionaire_%26_live_on_'Exotic_Island'%3F">"Who" wants to be a millionaire & live on 'Exotic Island'?</a>';
mw.messages.set( 'special-characters', '[[' + specialCharactersPageName + ']]' );
assert.htmlEqual(
'curly-brace': '{{int:message}}',
'single-square-bracket': '[https://www.mediawiki.org/ MediaWiki]',
'double-square-bracket': '[[Some page]]',
- 'regular': 'Other message'
+ regular: 'Other message'
} );
oldGMF = mw.jqueryMsg.getMessageFunction;
},
messages: {
// Used by accessKeyLabel in test for addPortletLink
- 'brackets': '[$1]',
+ brackets: '[$1]',
'word-separator': ' '
}
} ) );
assert.equal( mw.util.rawurlencode( 'Test:A & B/Here' ), 'Test%3AA%20%26%20B%2FHere' );
} );
- QUnit.test( 'wikiUrlencode', 11, function ( assert ) {
+ QUnit.test( 'wikiUrlencode', 10, function ( assert ) {
assert.equal( mw.util.wikiUrlencode( 'Test:A & B/Here' ), 'Test:A_%26_B/Here' );
// See also wfUrlencodeTest.php#provideURLS
$.each( {
'&': '%26',
'=': '%3D',
':': ':',
- ';@$-_.!*': ';@$-_.!*',
+ ';@$-_.!*\'': ';@$-_.!*\'',
'/': '/',
'~': '~',
'[]': '%5B%5D',
- '<>': '%3C%3E',
- '\'': '%27'
+ '<>': '%3C%3E'
}, function ( input, output ) {
assert.equal( mw.util.wikiUrlencode( input ), output );
} );
QUnit.test( 'wikiScript', 4, function ( assert ) {
mw.config.set( {
- 'wgScript': '/w/i.php', // customized wgScript for bug 39103
- 'wgLoadScript': '/w/l.php', // customized wgLoadScript for bug 39103
- 'wgScriptPath': '/w',
- 'wgScriptExtension': '.php'
+ wgScript: '/w/i.php', // customized wgScript for bug 39103
+ wgLoadScript: '/w/l.php', // customized wgLoadScript for bug 39103
+ wgScriptPath: '/w',
+ wgScriptExtension: '.php'
} );
assert.equal( mw.util.wikiScript(), mw.config.get( 'wgScript' ),
url = 'http://example.org/#&foo=bad';
assert.strictEqual( mw.util.getParamValue( 'foo', url ), null, 'Ignore hash if param is not in querystring but in hash (bug 27427)' );
- url = 'example.org?' + $.param( { 'TEST': 'a b+c' } );
+ url = 'example.org?' + $.param( { TEST: 'a b+c' } );
assert.strictEqual( mw.util.getParamValue( 'TEST', url ), 'a b+c', 'Bug 30441: getParamValue must understand "+" encoding of space' );
- url = 'example.org?' + $.param( { 'TEST': 'a b+c d' } ); // check for sloppy code from r95332 :)
+ url = 'example.org?' + $.param( { TEST: 'a b+c d' } ); // check for sloppy code from r95332 :)
assert.strictEqual( mw.util.getParamValue( 'TEST', url ), 'a b+c d', 'Bug 30441: getParamValue must understand "+" encoding of space (multiple spaces)' );
} );