Opened 13 years ago
Closed 13 years ago
#8870 closed Bug (fixed)
Content from table within <pre> tag is removed.
Reported by: | Paul Veldema | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6.3 |
Component: | Core : Tables | Version: | 3.6.3 |
Keywords: | Cc: |
Description
Put the following
Example code with text in the table cells to be pasted in code view:
<pre> <table border="1" cellpadding="1" cellspacing="1" style="width: 500px;" summary="bla2"> <caption> bla</caption> <tbody> <tr> <td> 1</td> <td> a</td> </tr> <tr> <td> 2</td> <td> b</td> </tr> <tr> <td> 3</td> <td> c</td> </tr> </tbody> </table> </pre>
Code after switch to wysiwyg mode:
<pre> </pre> <table border="1" cellpadding="1" cellspacing="1" style="width: 500px;" summary="bla2"> <caption> bla</caption> <tbody> </tbody> <tbody> </tbody> <tbody> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table>
Now the a b c and 1 2 3 are gone. Expected: that the pre still surrounds the table and that the table content is not removed.
Second example is with style on a cell of the table (some background color) to be pasted in code view:
<pre> <table border="1" cellpadding="1" cellspacing="1" style="width: 500px;" summary="bla2"> <caption> bla</caption> <tbody> <tr> <td style="background-color: rgb(51, 102, 102);"> </td> </tr> </tbody> </table> </pre>
Code after switch to wysiwyg mode:
<pre> </pre> <table border="1" cellpadding="1" cellspacing="1" style="width: 500px;" summary="bla2"> <caption> bla</caption> <tbody> </tbody> <tbody> <tr> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table>
The style on the cell is gone. And the amount of cells within the table is changed.
Expected: no change to the html and styles.
Both examples are probably the same regression compared to version 3.6.2 where these problems do not occur.
In case someone thinks this is not invalid html an example of a table within a pre tag: any revision diff page on code.google.com.
Attachments (1)
Change History (10)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Status: | new → confirmed |
---|
Reproducible from CKEditor 3.6.3 rev. [7411]
Changed 13 years ago by
Attachment: | 8870.patch added |
---|
comment:3 Changed 13 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | confirmed → review |
comment:4 follow-up: 6 Changed 13 years ago by
Expected: that the pre still surrounds the table and that the table content is not removed.
This is not part of the patch though, CKEditor works with XHTML1.0 dtd and this's not valid XHTML. I understand this's not a problem for HTML5 while it's out the scope of this ticket.
comment:5 Changed 13 years ago by
Milestone: | → CKEditor 3.6.3 |
---|
comment:6 Changed 13 years ago by
Replying to garry.yao:
Expected: that the pre still surrounds the table and that the table content is not removed.
This is not part of the patch though, CKEditor works with XHTML1.0 dtd and this's not valid XHTML. I understand this's not a problem for HTML5 while it's out the scope of this ticket.
Lemme make a small correction on this. Not even HTML5 says that <table>
can be inside <pre>
. Only phrasing elements are accepted.
comment:7 Changed 13 years ago by
Replying to pauljvrw:
In case someone thinks this is not invalid html an example of a table within a pre tag: any revision diff page on code.google.com.
Well, this just says that Google uses invalid HTML, not that it is valid. Unfortunately this is not a good justification for that.
The thing is that we need to come to a compromise and our difference is that we're not just HTML consumers but HTML producers as well, and people expect us to produce good HTML.
comment:8 Changed 13 years ago by
Status: | review → review_passed |
---|
comment:9 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [7454].
"In case someone thinks this is not invalid html an example of a table within a pre tag: any revision diff page on code.google.com. "
should be
"In case someone thinks this is not valid html an example of a table within a pre tag: any revision diff page on code.google.com. "