X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fmediawiki.util.js;h=fb34a89063ede298cd5598a2afa1ac4e2eadf778;hb=17e88d99eb768e4181207bbd35656d239ef5d4e8;hp=d0ec58501cab469c27ffbd155a989e20fed5a831;hpb=d6551bcbad8e2c0c94af630212433150ac7ff841;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/mediawiki.util.js b/resources/src/mediawiki/mediawiki.util.js index d0ec58501c..fb34a89063 100644 --- a/resources/src/mediawiki/mediawiki.util.js +++ b/resources/src/mediawiki/mediawiki.util.js @@ -65,17 +65,6 @@ */ rawurlencode: rawurlencode, - /** - * Encode the string like Sanitizer::escapeId() in PHP - * @deprecated since 1.30 use escapeIdForAttribute() or escapeIdForLink() - * - * @param {string} str String to be encoded. - * @return {string} Encoded string - */ - escapeId: function ( str ) { - return escapeIdInternal( str, 'legacy' ); - }, - /** * Encode string into HTML id compatible form suitable for use in HTML * Analog to PHP Sanitizer::escapeIdForAttribute() @@ -101,14 +90,9 @@ * @return {string} Encoded string */ escapeIdForLink: function ( str ) { - var mode = mw.config.get( 'wgFragmentMode' )[ 0 ], - id = escapeIdInternal( str, mode ); - - if ( mode === 'html5' ) { - id = encodeURIComponent( id ).replace( /%3A/g, ':' ); - } + var mode = mw.config.get( 'wgFragmentMode' )[ 0 ]; - return id; + return escapeIdInternal( str, mode ); }, /** @@ -561,7 +545,7 @@ * @inheritdoc #getUrl * @deprecated since 1.23 Use #getUrl instead. */ - mw.log.deprecate( util, 'wikiGetlink', util.getUrl, 'Use mw.util.getUrl instead.' ); + mw.log.deprecate( util, 'wikiGetlink', util.getUrl, 'Use mw.util.getUrl instead.', 'mw.util.wikiGetlink' ); /** * Add the appropriate prefix to the accesskey shown in the tooltip. @@ -581,7 +565,7 @@ } $nodes.updateTooltipAccessKeys(); - }, 'Use jquery.accessKeyLabel instead.' ); + }, 'Use jquery.accessKeyLabel instead.', 'mw.util.updateTooltipAccessKeys' ); /** * Add a little box at the top of the screen to inform the user of @@ -602,7 +586,19 @@ } mw.notify( message, { autoHide: true, tag: 'legacy' } ); return true; - }, 'Use mw.notify instead.' ); + }, '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