#9167 closed Bug (fixed)
Switching to source and back creates invalid html
Reported by: | Larry Hinderks | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6.6 |
Component: | General | Version: | 3.6.4 |
Keywords: | Oracle | Cc: |
Description
- On the demo page for CKEditor 3.6.4, clear the screen.
- Type the two lines. Hit CR after typing the first line.
This is line 1.
This is line 2.
- Switch to source mode and you will see the following.
<p> This is line 1.</p> <p> This is line 2.</p>
- While in source mode add a <br /> between the two p's as shown below.
<p> This is line 1.</p> <br /> <p> This is line 2.</p>
- Switch out of source mode and then back to source mode and you will see the following invalid html.
<p> This is line 1.</p> <p> </p> <p> <br /> <p> This is line 2.</p> </p> <p> </p>
- Notice that there is a p block within another p block. Also notice how the original html is modified by the insertion of p blocks with 's.
This is very problematic since we have many documents that exist with embedded br's and every time we save the files and reload them, they become more and more corrupt.
This worked properly in 3.6.2. No testing was done on 3.6.3.
Change History (12)
comment:1 Changed 12 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 12 years ago by
Also this case causes problems in 3.6.4 and IE 9 (maybe other browsers/versions)
To reproduce, type the following in source mode and then switch to WYSIWYG mode and then back to source mode
<br /> <table> </table>
Results, for IE 9
<p> </p> <p> <br /> <table> </table> </p> <p> </p>
Results for Chrome
<p> </p> <table> </table> <p> </p>
comment:3 Changed 12 years ago by
Also this case causes problems in 3.6.4 and IE 9 and Chrome (maybe other browsers/versions)
Many of our customers insert br's to space things in documents that are edited with CkEditor.
For some reason, CkEditor 3.6.4 changes br's to to p's in some cases, inserts p's and in general generates strange results when br's are used.
Earlier versions of Ckeditor left the br's intact. Converting br's to p's inserts extra spaces and modifies our customers layouts.
This is a huge problem for our customers with existing documents that they have constructed that contain br's.
Check out the case where the source has 2 ul lists seperated by 2 br's
To Reproduce type the following in source mode and then switch to WYSIWYG mode and then back to source mode
<ul> </ul> <br /> <br /> <ul> </ul>
Results for IE9
<ul> </ul> <p> </p> <p> <br /> <p> </p> </p> <p> <br /> <ul> </ul> </p> <p> </p> <p> </p>
Results for Chrome
<ul> </ul> <p> </p> <p> </p> <ul> </ul> <p> </p> <p> </p>
comment:4 Changed 12 years ago by
Here is a simple case that causes the same type of problem in ie including ie10.
This was done on the ckeditor demo site with version 3.6.5 (revision 7647) using ie9 and 10. IE 8 was not checked for this defect.
To Reproduce type the following in source mode and the switch to WYSIWYG and then back to source mode.
<br /> <p>line1</p>
Results for IE.
<p> </p> <p> <br /> <p> line1</p> </p> <p> </p>
Expected Results
<br /> <p>line1</p>
OR
<p> </p> <p>line1</p>
comment:5 Changed 12 years ago by
@lhinderks: Turn off the autoParagraph configuration is enough to eliminiate BR in the above cases, from been converted to paragraph.
Leave this ticket open, as the current auto paragraphing result for BR is incorrect and is variant among browsers.
comment:6 Changed 12 years ago by
Keywords: | Oracle added |
---|
Another example:
Paste below in fullpage mode:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test page</title> </head> <body style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" bgcolor="#DDE3DD"> <p>first paragraph</p> <br /> <p>middle paragraph</p> <p> </p> <p> </p> <p>second paragraph</p> </body> </html>
Result in IE
<body bgcolor="#dde3dd" style="font-size: 10pt; font-family: Arial"> <p> first paragraph</p> <p> </p> <p> <br /> <p> middle paragraph</p> </p> <p> </p> <p> </p> <p> </p> <p> second paragraph</p> </body>
Result in Modern browsers in CKE 3.x and all browsers in CKE 4.x (v4)
<body bgcolor="#DDE3DD" style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"> <p> first paragraph</p> <p> </p> <p> middle paragraph</p> <p> </p> <p> </p> <p> </p> <p> second paragraph</p> </body>
comment:7 Changed 12 years ago by
comment:8 Changed 12 years ago by
Milestone: | → CKEditor 4.0.1 |
---|
Let's revert [7526] for now, which seems to be created because of this TC:
Source: <p>foo</p><br />bar Editor fixing before [7526]: <p>foo</p><br /><p>bar</p> ... after [7526]: <p>foo</p><p><br />bar</p>
Still we don't have a real TC issue for this case, so better to just open a ticket for it and wait for someone to raise the priority of this.
comment:9 Changed 12 years ago by
Milestone: | CKEditor 4.0.1 → CKEditor 3.6.6 |
---|
This is a v3 issue only.
comment:10 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
Fixed with [7676].
Reproducible in all browsers from CKE 3.6.4 rev.[7526].
To reproduce just paste the below code and switch to WYSIWYG
IE produces:
All other browsers produce: