r81650 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81649‎ | r81650 | r81651 >
Date:21:46, 7 February 2011
Author:brion
Status:ok
Tags:
Comment:
* (bug 26975) Regression fix for search-and-replace in WikiEditor

string_instance.escapeRE() -> $.escapeRE(string_instance)
Modified paths:
  • /trunk/extensions/WikiEditor/modules/ext.wikiEditor.dialogs.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiEditor/modules/ext.wikiEditor.dialogs.js
@@ -508,7 +508,7 @@
509509 open: function() {
510510 // Cache the articlepath regex
511511 $(this).data( 'articlePathRegex', new RegExp(
512 - '^' + ( wgServer + wgArticlePath ).escapeRE()
 512+ '^' + $.escapeRE( wgServer + wgArticlePath )
513513 .replace( /\\\$1/g, '(.*)' ) + '$'
514514 ) );
515515 // Pre-fill the text fields based on the current selection
@@ -981,7 +981,7 @@
982982 flags += 'g';
983983 }
984984 if ( !isRegex ) {
985 - searchStr = searchStr.escapeRE();
 985+ searchStr = $.escapeRE( searchStr );
986986 }
987987 try {
988988 var regex = new RegExp( searchStr, flags );

Follow-up revisions

RevisionCommit summaryAuthorDate
r816541.17: MFT r78372, r79324, r80841, r81430, r81488, r81496, r81554, r81561, r81...catrope22:28, 7 February 2011

Status & tagging log