Make WordPress Core

Changeset 22600


Ignore:
Timestamp:
11/15/2012 10:56:44 PM (12 years ago)
Author:
azaozz
Message:

TinyMCE: extend the allowed obsolete attributes to include tr, th and td (thead, tfoot and tbody weren't around in HTML 3.2), see #22175

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js

    r22411 r22600  
    145145            });
    146146
    147             // Add HTML5 obsolete attributes that are still in use.
     147            // Add obsolete HTML attributes that are still in use.
    148148            ed.onPreInit.add(function(ed) {
    149                 // This list is taken from TinyMCE 3.5.7 getHTML5()
    150                 var commonAttr = 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup';
    151                 // Additional table attributes from TinyMCE 3.5.7 getHTML4()
     149                // The commonAttr are from TinyMCE 3.5.7 getHTML5()
     150                // Obsolete attributes are from TinyMCE 3.5.7 getHTML4()
     151                var commonAttr = 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',
     152                    tdAttr = commonAttr + '|abbr|axis|headers|scope|rowspan|colspan|char|charoff|align|valign|halign|nowrap|bgcolor|width|height';
     153                // Obsolete table attributes
    152154                ed.schema.addValidElements('table['+commonAttr+'|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor]');
     155                // Obsolete tr attributes
     156                ed.schema.addValidElements('tr['+commonAttr+'|align|char|charoff|valign|halign|bgcolor]');
     157                // Obsolete td and th attributes
     158                ed.schema.addValidElements('td['+tdAttr+'],th['+tdAttr+']');
    153159                // Adds "name" for <a>
    154160                ed.schema.addValidElements('a['+commonAttr+'|href|target|ping|rel|media|type|name]');
Note: See TracChangeset for help on using the changeset viewer.