Closed Bug 103539 Opened 23 years ago Closed 23 years ago

Find does not always find strings containing spaces.

Categories

(SeaMonkey :: UI Design, defect, P3)

x86
Windows 2000

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: mdakin, Assigned: kinmoz)

References

()

Details

(Whiteboard: CANDIDATE_094, fixed on trunk)

Attachments

(2 files, 2 obsolete files)

Steps: -download the html from the URL (Beware, very big one) http://www.tuxedo.org/~esr/jargon/jargon.html Try to find the sentence from second paragraph "The Jargon File is a common heritage of the hacker culture. Over the years a number of individuals have volunteered considerable time to maintaining the File and been recognized by the net at large as editors of it." in the file -copy the text from HTML -paste it to find text edit box in find dialog -and click Find button Expected result: Mozilla Finds the text and highlights it Actual Results: Mozilla pops up an "text you entered cannot be found" message is there a limitation on string size in dialog? Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4+) Gecko/20011004
-> XP Apps: GUI Features, for initial triage
Assignee: asa → blakeross
Component: Browser-General → XP Apps: GUI Features
QA Contact: doronr → sairuh
The given string contains more than one space. Dupe of bug 98730 - "Find/Replace not finding a string with more than one space" *** This bug has been marked as a duplicate of 98730 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
But I tried other shorter strings on page with more than 1 spaces in it, it found them.. I dont think this is a dup. it finds the string "The Jargon File is a common heritage of the hacker culture." but cannot find the fallowing "The Jargon File is a common heritage of the hacker culture. Over"
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
--> kin
Assignee: blakeross → kin
The problem is that the whitespace ignoring code in find is broken. In this particular case the user sees only one space between certain words, and in the actual text that find is searching through, some of these words are separated by a space and a newline (2 spaces in a row). I'll have to rework the find code's whitespace ignoring code so that we match at least n spaces (n being the number of spaces in a row in the pattern string) within the run of spaces in the string being searched, and then ignore any extras.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3
Target Milestone: --- → mozilla0.9.6
Attached patch Patch Rev 1 (obsolete) — Splinter Review
Changing summary from: "Find" does not find long strings in big HTML pages to: Find does not always find strings containing spaces.
Summary: "Find" does not find long strings in big HTML pages → "Find" does not find long strings in big HTML pages
Whiteboard: FIX IN HAND, need r= and sr=
Summary: "Find" does not find long strings in big HTML pages → Find does not always find strings containing spaces.
Attachment #54757 - Attachment is obsolete: true
Comment on attachment 55136 [details] [diff] [review] Patch Rev 1.1 (Minor changes based on review with sfraser) sr=sfraser
Attachment #55136 - Flags: superreview+
Whiteboard: FIX IN HAND, need r= and sr= → FIX IN HAND, need r=
Blocks: 106961
I recommended a perf enhancement and found a correctness prob. Kin has fixed both of these (fixesnot included here), so r=jfrancis
Whiteboard: FIX IN HAND, need r= → FIX IN HAND, ready to land; GO BABY GO!!!
Attachment #55136 - Attachment is obsolete: true
Attachment #55631 - Flags: superreview+
Attachment #55631 - Flags: review+
Fix checked in on trunk: mozilla/editor/txtsvc/src/nsFindAndReplace.cpp revision 1.8
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Keywords: vtrunk
Resolution: --- → FIXED
Whiteboard: FIX IN HAND, ready to land; GO BABY GO!!! → CANDIDATE_094, fixed on trunk
vrfy fixed using 2001.11.08.0x-comm bits on linux rh6.2, winnt and mac os 10.1. using kin's attached test case, Find was able to locate the following strings: "words in" [1 space] "words in" [2 spaces] "words in" [3 spaces] this is expected, since the source contains "words   in".
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: