Opened 12 years ago
Last modified 9 years ago
#10553 confirmed Bug
Find and Replace dialog cannot match text with multiple spaces
Reported by: | Zoltan Koszegi | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.1.1 |
Keywords: | oracle IBM | Cc: | satya_minnekanti@… |
Description
Steps To Recreate (tested with IE9 on Demo page):
1) Include multiple spaces between words.
2) Click the 'Replace' tool.
3) Choose to replace " " with " " (or just find any number of spaces > 1).
RESULT: You can not find/replace 2 or more spaces.
This is probably because multiple spaces in html are represented as nbsp entities or binary nbsp characters plus a single space character, and probably CK doesn't handle that.
Attachments (1)
Change History (11)
comment:1 Changed 12 years ago by
Keywords: | oracle added |
---|---|
Version: | → 4.1.1 |
comment:2 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:3 Changed 11 years ago by
Another (similar) TC: the nbsp replacement sometimes goes a little wrong. Might be rare and/or impossible to fix but at least people coming from Google might find interesting: accidental double spaces can cause the content searchability to fail. To duplicate in IE9 or Chrome:
- Go to http://ckeditor.com/demo
- Clear the editor
- Write "ponies rule" (with two spaces between the words)
CKEDITOR.instances.editor1.getData(); now returns "<p>ponies rule</p>".
- Move caret to "ponies |rule" (caret after the two spaces)
- Hit backspace to remove the 'accidental' double space
CKEDITOR.instances.editor1.getData(); now returns "<p>ponies rule</p>".
After step 5 the search function can't find "ponies rule". Happens even when entitites = false; in the config. Weather the first or second space gets entityfied seems to depend on the browser or luck.
comment:4 Changed 11 years ago by
I have tested this and Chrome in fact return "<p>ponies rule</p>" which after removing one space gets changed to "<p>ponies rule</p>". The first text with entity can't be found while second can.
This " " is controlled by browser and we can do nothing here but I believe editor should be able to search for entities to.
In IE this looks a little bit different. The "<p>ponies rule</p>" is created and search success fail depends on which space you remove (unlike in Chrome where always entity is removed). Anyway result is the same - of you have text with entity, it won't be found.
Changed 11 years ago by
Attachment: | ckeditor_nbsp_chrome.png added |
---|
Screenshot of chrome showing nbsp entity issue in demo
comment:5 Changed 11 years ago by
In Chrome, did you backspace the " " or the "nbsp"? Because for chrome for me actually does happen, see attached screenshot. Chrome Version "28.0.1500.72 m" on Windows 7 64bit. So in Chrome the TC is a little different, in step 4 the issue is duplicated by moving caret to "ponies | rule" and pressing backspace or "ponies| rule" and pressing delete.
I can't put the image directly here because Akismet tells me it's spam - derp!
comment:6 Changed 11 years ago by
We use CK editor in IE browser control. Everything I reported just tried with IE.
comment:7 Changed 11 years ago by
The bug with Find can also be reproduced in FF:
Steps:
- Type in A B(with 2/3 spaces between the letters)
- Open Find dialog and search for A B(with 2/3 spaces between the letters)
Result: Text was not found
comment:9 Changed 11 years ago by
It's a browser independent bug, and easiest use case is:
- Open editor with following content: "<p>hello world</p>"
- Open "Find" dialog box by clicking appropiate button on toolbar
- Try to find sentence "hello world"
Actual result: Nothing found but should one
comment:10 Changed 9 years ago by
Summary: | CANNOT FIND/REPLACE MULTIPLE SPACES → Find and Replace dialog cannot match text with multiple spaces |
---|
Problem can be reproduced from CKEditor 3.0 in both CKE 3.x and 4.x.