Opened 12 years ago
Closed 12 years ago
#10381 closed Bug (duplicate)
View Source replacing <br> with
Reported by: | Chris Wells | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Source View | Version: | |
Keywords: | Cc: |
Description
I am running in to an issue with both Chrome and Firefox where under certain circumstances when I hit the View Source button <br> elements are being replaced with an encoded space ( ).
The consistently reproducible example I have found is to have a <table> with a block element (<div>, for example) after it. If I click after the table in ckeditor, do SHIFT+ENTER for a line break, the cursor moves down and viewing source on the editor does indeed show a <br>. However, when I click "View Source", the <br> is changed to . Going back to editor view, it once again becomes <br>.
I have setup a demo of this issue with the steps to reproduce here:
Change History (4)
comment:1 follow-up: 2 Changed 12 years ago by
Status: | new → pending |
---|---|
Version: | 4.1.1 |
comment:2 Changed 12 years ago by
Replying to j.swiderski:
Could you provide more detailed information?
- Code that needs to be inserted into editor
- Plain steps explaining how to reproduce.
Your problem sounds like duplicate of #10146. In that topic however br are simply lost. Spaces aren't changed back into brs.
Apologies, I recently updated our website and did not move the page with the steps to reproduce. I have reestablished that page at the same URL (http://www.usasean.org/ckeditor4/) and the steps to reproduce are included there inside the editor.
At a quick glance it does look like it may be a duplicate of #10146, or at least very similar to it. I will take a closer look at that one later today.
comment:3 Changed 12 years ago by
Here is an updated explanation following a form similar to #10146. Having gone through these steps and reviewed #10146, I'm still not sure whether or not this is the same issue, but they do definitely seem to be very closely related.
To reproduce:
- Open the CKEditor ENTER key configuration demo
- Using the Produce <br> on ENTER demo, toggle source on and enter the following code:
<table> <tbody> <tr> <td>Table cell contents</td> </tr> </tbody> </table> <p>P contents</p>
- Toggle source off, click after the words Table cell contents and hit the enter key once.
Result (using Chrome's developer tools to view the page source):
<table><tbody><tr><td>Table cell contents</td></tr></tbody></table> <br> "​" "" <p>P contents</p>
- Toggle source on.
Result (as it appears in ckeditor):
<table> <tbody> <tr> <td>Table cell contents</td> </tr> </tbody> </table> <p>P contents</p>
- Toggle source off.
Result (using Chrome's developer tools to view the page source):
<table><tbody><tr><td>Table cell contents</td></tr></tbody></table> <br> <p>P contents</p>
I actually had not previously noticed what Chrome's developer tools show for the source after step 3, but I felt compelled to note it because of the "​" bit, which google tells me is a Unicode Character 'ZERO WIDTH SPACE'. Maybe this informs the issue, or maybe its unrelated and just complicates it. Either way, the problem is there.
comment:4 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | pending → closed |
- ​ character was described in #10031 and IMO is not releated to this problem.
- Checking code with devtools and source mode is not the way to go. When in WYSIWYG mode, CKEditor inserts many helper attributes. They get filtered when switching to Source mode. In short code in WYSIWYG is different to output html in source mode.
- Clicking behind table is only possible in Webkit. Inserting new lines behind it looks however the same as in #10146.
I'm closing this issue as duplicate.
Unfortunately workaround provided in #10146 doesn't quite work in this case.
Could you provide more detailed information?
Your problem sounds like duplicate of #10146. In that topic however br are simply lost. Spaces aren't changed back into brs.