Closed Bug 389651 Opened 17 years ago Closed 4 years ago

​ (zero width space) should be ignored while searching/finding text

Categories

(Core :: Find Backend, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: martijn.martijn, Assigned: emilio)

References

(Depends on 1 open bug, )

Details

(Keywords: helpwanted)

Attachments

(1 file)

This is a follow-up from bug 294615, comment 5.
"
We _may_ also want to ignore ​ (zero width space), which can be used as a
line-breaking character without visible hyphen (for example in URLs).
"
That seems like a good idea to me.
And maybe there are more unicode characters that need to ignored.
It might be useful to see what other browsers are doing.
Keywords: helpwanted
Most other browsers don't even ignore ­ when searching. Opera ignores it only when the hyphen is invisible (=not at the end of a line). 
No browser I tested (Opera, IE6, Safari) ignored ​.
Added a data: entry splitting the word "testing" up with various zero width space characters in the URL field for testing with any proposed patches.
Bug 647805 is pretty much about the same problem, but with regard to ZWJ and ZWNJ. Bug 640856 more generally addresses all Unicode normalization issues in the "Find" operation. If it is patched, this bug will be fixed, too.
Depends on: 640856
Component: Embedding: APIs → Find Backend
Tested in Chromium 50 just now, and it handles this correctly.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

We recently hit this problem with our documentation pages when viewed by Firefox.
The raw HTML source gets rendered as:

<code>database.history&#8203;.kafka.bootstrap.servers</code>

If a user attempts to search for database.history.kafka.bootstrap.servers, the user gets no hits because of the inclusion of the non-breaking space unicode character; however if a user performs the same search on the same page in Chrome, it is able to find this reference.

Should be easy enough to fix... :)

Assignee: nobody → emilio
Attachment #9176131 - Attachment description: Bug 389651 - Make find-in-page ignore non-matching zwsp characters. r=jfkthame → Bug 389651 - Make find-in-page ignore non-matching default-ignorable characters. r=jfkthame
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f84ef8062ad9
Make find-in-page ignore non-matching default-ignorable characters. r=jfkthame
Status: REOPENED → RESOLVED
Closed: 7 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: