Opened 13 years ago
Closed 13 years ago
#10073 closed Bug (fixed)
ACF should clean up empty elements
| Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.1 RC |
| Component: | General | Version: | |
| Keywords: | Drupal | Cc: | wim.leers@… |
Description (last modified by )
TC:
- Create editor without image button (e.g. use one of editors in filter sample).
- Switch to source.
- Set:
<p><em><img src="" alt=""></em></p>. - Switch to wysiwyg mode.
- Check with dev tools that editable contains
<p><em></em></p>.
There are few cases:
<b><img></b>: after filtering out<img>entire<b>should be removed, because it's inDTD.$removeEmpty.<a href=""><img></a>is a different case because it's similar to<a name=""><img></a>and<a name=""></a>shouldn't be removed. So it's an exception, because 'a' isn't included in$removeEmpty. However, why doesn't data processor fix this case? It fixes the case I described in the next point, but why not this? Especially, that I see a filter's rule for htmlFilter that fixes this on output. I think that identical rule should exist for toHtml(). And perhaps previous point should also be handled by data processor...<p><img></p>}: after filtering out<img>filter will left empty<p></p>which then will be correctly handled by data processor, so in this case we don't have to act.
Important note: http://dev.ckeditor.com/ticket/9992#comment:7
Change History (7)
comment:1 Changed 13 years ago by
| Status: | new → confirmed |
|---|
comment:2 Changed 13 years ago by
| Description: | modified (diff) |
|---|
comment:3 Changed 13 years ago by
comment:4 Changed 13 years ago by
| Owner: | set to Piotrek Koszuliński |
|---|---|
| Status: | confirmed → assigned |
comment:6 Changed 13 years ago by
| Status: | review → review_passed |
|---|
comment:7 Changed 13 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
Merged to major with git:3ba4d62 on dev and 708b379 on tests.

Another uncool case - when table is allowed (e.g. by style), but tr,td are not, then table is incorrectly stripped out.