Last modified: 2012-04-19 21:43:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 21112 - Search and Replace makes browser barf on invalid regex
Search and Replace makes browser barf on invalid regex
Status: CLOSED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UsabilityInitiative (Other open bugs)
unspecified
PC Windows XP
: Normal major (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks: 36111
  Show dependency treegraph
 
Reported: 2009-10-12 12:40 UTC by Calcey QA
Modified: 2012-04-19 21:43 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Search and Replace regex error (63.92 KB, application/pdf)
2009-10-12 12:40 UTC, Calcey QA
Details

Description Calcey QA 2009-10-12 12:40:20 UTC
Created attachment 6665 [details]
Search and Replace regex error

Reporting against Babaco Release r57575.

Steps to reproduce::
1. Edit a component string
2. Search for "[^]he" and replace a string
3. Click on Replace All

<<Replace is not happen>> 


Expected output::
Replace should be done


Test Environment::
Browser (User-Agent): 	Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
Time and Date: 	3:55:22 AM - Monday, October 12, 2009
Javascript:	Enabled
Cookies Enabled:Enabled
Java Enabled:	Enabled 

Browser (User-Agent): 	Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Time and Date: 	6:00:26 PM - Monday, October 12, 2009
Javascript:	Enabled
Cookies Enabled:Enabled
Comment 1 Roan Kattouw 2009-10-12 12:54:33 UTC
(In reply to comment #0)
> 2. Search for "[^]he" and replace a string
That's an invalid regex. We should handle that more gracefully than a browser error, of course.
Comment 2 Roan Kattouw 2009-10-14 18:27:43 UTC
Fixed in r57707
Comment 3 Calcey QA 2009-10-16 09:58:40 UTC
Reporting against Babaco Release : r57727

Steps to Reproduce ::

Browser : IE7 or IE8

1) Select a random page
2) Edit a section
3) Type the following

Test Calcey
Test Calcey
Test Calcey


4) Opern serach and replace and search for [a-z][^]st and replace it with QA 
5) Click on "Replace All"
<< Message : The regular expression you entered is invalid: Expected ']' in regular expression >>
6) Then the search string change for [a-z][^ ]st
<<Test replace with QA>>

<<[a-z][^]st and [a-z][^ ]st both regular expressions are work in all other browsers>>

<<Opera 9.6 [a-z][^]st not find any strings and [a-z][^ ]st is replacing the the search sting>>

Expected Outcome::
regular expression replace should be same for all the browsers


Test Environmet::

Browser (User-Agent):   Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;WOW64; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)

Browser (User-Agent):   Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;Trident/4.0)

Browser (User-Agent):	Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0

Browser (User-Agent):	Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.28 (KHTML, like Gecko) Version/3.2.2 Safari/525.28.1

Browser (User-Agent):  	Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 (.NET CLR 3.5.30729)

Browser (User-Agent): 	Opera/9.63 (Windows NT 6.0; U; en) Presto/2.1.1

Browser (User-Agent):     Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00
Comment 4 Roan Kattouw 2009-10-16 17:47:57 UTC
(In reply to comment #3)
> Expected Outcome::
> regular expression replace should be same for all the browsers
> 
We can't help that some browsers have different ideas of valid regexes than others. Not our fault, so reclosing. AFAIK, [^] is an invalid regex.
Comment 5 Calcey QA 2009-10-19 04:33:20 UTC
agree and close

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links