[wp-trac] [WordPress Trac] #28940: TinyMCE strips out empty <i> tags, breaking font awesome

WordPress Trac noreply at wordpress.org
Sun Aug 10 18:56:13 UTC 2014


#28940: TinyMCE strips out empty <i> tags, breaking font awesome
-------------------------------------------------+-------------------------
 Reporter:  DonSailieri                          |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  TinyMCE                              |  Release
 Severity:  normal                               |     Version:  3.9.1
 Keywords:  has-patch needs-testing dev-         |  Resolution:
  feedback                                       |     Focuses:
-------------------------------------------------+-------------------------
Changes (by ruud@…):

 * keywords:  has-patch needs-testing => has-patch needs-testing dev-
               feedback


Comment:

 Hi Azaozz,

 If any-one wants to test this patch, just try to enter any font-awesome
 characters. You can see how by looking up the 'How to use' paragraph at
 this link:
 http://getbootstrap.com/2.3.2/base-css.html#icons

 I tested the patch and can confirm that without the patch the empty <i>
 tags are removed (version WordPress 4.0-beta3-20140809).
 After applying the patch empty <i> tags are unchanged when you switch
 between the visual and text editors.

 I want to make a case for this patch to be included in version 4.0,
 because I think it is important to have a consistent behavior. In older
 versions the empty <i> tags are not stripped out so people can use it to
 enter font-awesome icons / bootstrap 2 Glyphicons. If version 4.0 would
 break that, they can lose these characters when re-opening older posts,
 switching from text to visual and saving the post. This might even happen
 without them noticing it, but the meaning of their content could have
 changed much because of it.

 '''However''': I noticed that Bootstrap 3 now uses an empty span tag to
 enter Glypicons (http://getbootstrap.com/components/) and I'm sorry to say
 but these also get parsed out when switching between the visual and text
 editors :(

 Will make a new bug report for this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28940#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list