* Revision::getRawComment()
* window.gM() from mediawiki.jqueryMsg, deprecated in 1.23, was removed. Use
mw.msg() or mw.message() instead.
+* mw.util.escapeId(), deprecated in 1.30, was removed. Use
+ mw.util.escapeIdForAttribute or mw.util.escapeIdForLink instead.
* The SqlDataUpdate class, deprecated in 1.28, has been removed.
=== Deprecations in 1.32 ===
return true;
}, 'Use mw.notify instead.', 'mw.util.jsMessage' );
- /**
- * Encode the string like Sanitizer::escapeId() in PHP
- *
- * @method escapeId
- * @deprecated since 1.30 use escapeIdForAttribute() or escapeIdForLink()
- * @param {string} str String to be encoded.
- * @return {string} Encoded string
- */
- mw.log.deprecate( util, 'escapeId', function ( str ) {
- return escapeIdInternal( str, 'legacy' );
- }, 'Use mw.util.escapeIdForAttribute or mw.util.escapeIdForLink instead.', 'mw.util.escapeId' );
-
/**
* Initialisation of mw.util.$content
*/
assert.equal( util.rawurlencode( 'Test:A & B/Here' ), 'Test%3AA%20%26%20B%2FHere' );
} );
- QUnit.test( 'escapeId', function ( assert ) {
- mw.config.set( 'wgFragmentMode', [ 'legacy' ] );
- $.each( {
- '+': '.2B',
- '&': '.26',
- '=': '.3D',
- ':': ':',
- ';': '.3B',
- '@': '.40',
- $: '.24',
- '-_.': '-_.',
- '!': '.21',
- '*': '.2A',
- '/': '.2F',
- '[]': '.5B.5D',
- '<>': '.3C.3E',
- '\'': '.27',
- '§': '.C2.A7',
- 'Test:A & B/Here': 'Test:A_.26_B.2FHere',
- 'A&B&C&amp;D&amp;amp;E': 'A.26B.26amp.3BC.26amp.3Bamp.3BD.26amp.3Bamp.3Bamp.3BE'
- }, function ( input, output ) {
- assert.equal( util.escapeId( input ), output );
- } );
- } );
-
QUnit.test( 'escapeIdForAttribute', function ( assert ) {
// Test cases are kept in sync with SanitizerTest.php
var text = 'foo тест_#%!\'()[]:<>',