mediawiki.util: Drop escapeId(), deprecated since 1.30 and unused
authorJames D. Forrester <jforrester@wikimedia.org>
Fri, 4 May 2018 18:33:33 +0000 (11:33 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Mon, 7 May 2018 19:32:39 +0000 (12:32 -0700)
Bug: T193901
Change-Id: Ifef37d2f0ccf8acbe36900a25d2a51864083f11f

RELEASE-NOTES-1.32
resources/src/mediawiki/mediawiki.util.js
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js

index 14f2d37..5c1adcb 100644 (file)
@@ -71,6 +71,8 @@ because of Phabricator reports.
   * 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 ===
index f0c74ce..6a88bd6 100644 (file)
                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
         */
index 5508088..f776d41 100644 (file)
                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&amp;C&amp;amp;D&amp;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 тест_#%!\'()[]:<>',