[wp-trac] [WordPress Trac] #13314: HTML is deleted when switched to visual editor

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 6 19:55:59 UTC 2012


#13314: HTML is deleted when switched to visual editor
--------------------------+------------------------------
 Reporter:  BH8489        |       Owner:  azaozz
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------------------

Comment (by azaozz):

 Re-reading the ticket, this seems more about kses removing html tags when
 a post published by a user with `unlimited_html` cap is edited by a user
 without `unlimited_html`.

 Regarding tags that are changed/stripped when switching Text->Visual and
 then Visual->Text: this parses the string html into a DOM, then serializes
 the DOM back into a string. However the DOM for a contentEditable is not
 exactly the same as a "standard" web page, there are more browser quirks.

 In that process anything that the browser cannot parse or understand is
 skipped. TinyMCE does a very good job of normalizing this and has a large
 list of tags and attributes to look at. If an attribute is valid xhtml1
 and is removed, we can look at it on a case by case basis and try to fix
 it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13314#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list