Ticket #22842: 22842.7.diff

File 22842.7.diff, 10.7 KB (added by koopersmith, 5 months ago)
Line 
1Index: wp-includes/js/tinymce/wp-tinymce-schema.js
2===================================================================
3--- wp-includes/js/tinymce/wp-tinymce-schema.js (revision 23147)
4+++ wp-includes/js/tinymce/wp-tinymce-schema.js (working copy)
5@@ -58,48 +58,48 @@
6 
7                if (!html5) {
8                        html5 = mapCache.html5 = unpack({
9-                                       A : 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup|lang|xml:lang|dir',
10-                                       B : '#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|' +
11-                                               'meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr|acronym|basefont|font|big|strike|s|u|tt|applet',
12+                                       A : 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',
13+                                       B : '#|a|abbr|area|audio|b|bdi|bdo|br|button|canvas|cite|code|command|data|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|' +
14+                                               'meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr',
15                                        C : '#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|' +
16                                                'figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|' +
17-                                               'p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video|acronym|basefont|font|big|strike|s|u|tt|applet|isindex|noframes|center|dir'
18+                                               'p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video'
19                                }, 'html[A|manifest][body|head]' +
20                                        'head[A][base|command|link|meta|noscript|script|style|title]' +
21                                        'title[A][#]' +
22                                        'base[A|href|target][]' +
23-                                       'link[A|href|rel|media|type|sizes][]' +
24+                                       'link[A|href|rel|media|type|sizes|crossorigin|hreflang][]' +
25                                        'meta[A|http-equiv|name|content|charset][]' +
26-                                       'style[A|type|media|scoped|xml:space][#]' +
27-                                       'script[A|charset|type|src|defer|async|language|xml:space][#]' +
28+                                       'style[A|type|media|scoped][#]' +
29+                                       'script[A|charset|type|src|defer|async|crossorigin][#]' +
30                                        'noscript[A][C]' +
31-                                       'body[A|onload|onunload|background|bgcolor|text|link|vlink|alink][C]' +
32+                                       'body[A|onafterprint|onbeforeprint|onbeforeunload|onblur|onerror|onfocus|onfullscreenchange|onfullscreenerror|onhashchange|onload|onmessage|onoffline|ononline|onpagehide|onpageshow|onpopstate|onresize|onscroll|onstorage|onunload][C]' +
33                                        'section[A][C]' +
34                                        'nav[A][C]' +
35                                        'article[A][C]' +
36                                        'aside[A][C]' +
37-                                       'h1[A|align][B]' +
38-                                       'h2[A|align][B]' +
39-                                       'h3[A|align][B]' +
40-                                       'h4[A|align][B]' +
41-                                       'h5[A|align][B]' +
42-                                       'h6[A|align][B]' +
43+                                       'h1[A][B]' +
44+                                       'h2[A][B]' +
45+                                       'h3[A][B]' +
46+                                       'h4[A][B]' +
47+                                       'h5[A][B]' +
48+                                       'h6[A][B]' +
49                                        'hgroup[A][h1|h2|h3|h4|h5|h6]' +
50                                        'header[A][C]' +
51                                        'footer[A][C]' +
52                                        'address[A][C]' +
53-                                       'p[A|align][B]' +
54-                                       'br[A|clear][]' +
55-                                       'pre[A|width|xml:space][B]' +
56-                                       'dialog[A][dd|dt]' +
57+                                       'p[A][B]' +
58+                                       'br[A][]' +
59+                                       'pre[A][B]' +
60+                                       'dialog[A|open][C|dd|dt]' +
61                                        'blockquote[A|cite][C]' +
62-                                       'ol[A|start|reversed|type|compact][li]' +
63-                                       'ul[A|type|compact][li]' +
64-                                       'li[A|value|type][C]' +
65-                                       'dl[A|compact][dd|dt]' +
66-                                       'dt[A][B]' +
67+                                       'ol[A|start|reversed][li]' +
68+                                       'ul[A][li]' +
69+                                       'li[A|value][C]' +
70+                                       'dl[A][dd|dt]' +
71+                                       'dt[A][C|B]' +
72                                        'dd[A][C]' +
73-                                       'a[A|href|target|ping|rel|media|type|tabindex|onfocus|onblur|charset|name|hreflang|rev|shape|coords][B]' +
74+                                       'a[A|href|target|download|ping|rel|media|type][C|B]' +
75                                        'em[A][B]' +
76                                        'strong[A][B]' +
77                                        'small[A][B]' +
78@@ -122,68 +122,58 @@
79                                        'ruby[A][B|rt|rp]' +
80                                        'rt[A][B]' +
81                                        'rp[A][B]' +
82+                                       'bdi[A][B]' +
83                                        'bdo[A][B]' +
84                                        'span[A][B]' +
85-                                       'ins[A|cite|datetime][C]' +
86-                                       'del[A|cite|datetime][C]' +
87+                                       'ins[A|cite|datetime][C|B]' +
88+                                       'del[A|cite|datetime][C|B]' +
89                                        'figure[A][C|legend|figcaption]' +
90                                        'figcaption[A][C]' +
91-                                       'img[A|alt|src|height|width|usemap|ismap|name|longdesc|align|border|hspace|vspace][]' +
92-                                       'iframe[A|name|src|height|width|sandbox|seamless|longdesc|frameborder|marginwidth|marginheight|scrolling|align][]' +
93+                                       'img[A|alt|src|srcset|crossorigin|usemap|ismap|width|height][]' +
94+                                       'iframe[A|name|src|srcdoc|height|width|sandbox|seamless|allowfullscreen][C|B]' +
95                                        'embed[A|src|height|width|type][]' +
96-                                       'object[*][]' +
97-                                       'param[A|name|value|valuetype|type][]' +
98-                                       'details[A|open][C|legend]' +
99-                                       'command[A|type|label|icon|disabled|checked|radiogroup][]' +
100-                                       'menu[A|type|label|compact][C|li]' +
101-                                       'legend[A|align][C|B]' +
102-                                       'div[A|align][C]' +
103+                                       'object[A|data|type|typemustmatch|name|usemap|form|width|height][C|B|param]' +
104+                                       'param[A|name|value][]' +
105+                                       'summary[A][B]' +
106+                                       'details[A|open][C|legend|summary]' +
107+                                       'command[A|type|label|icon|disabled|checked|radiogroup|command][]' +
108+                                       'menu[A|type|label][C|li]' +
109+                                       'legend[A][C|B]' +
110+                                       'div[A][C]' +
111                                        'source[A|src|type|media][]' +
112-                                       'audio[A|src|autobuffer|autoplay|loop|controls][source]' +
113-                                       'video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]' +
114-                                       'hr[A|align|noshade|size|width][]' +
115-                                       'form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target|onsubmit|onreset|accept][C]' +
116+                                       'track[A|kind|src|srclang|label|default][]' +
117+                                       'audio[A|src|autobuffer|autoplay|loop|controls|crossorigin|preload|mediagroup|muted][C|source|track]' +
118+                                       'video[A|src|autobuffer|autoplay|loop|controls|width|height|poster|crossorigin|preload|mediagroup|muted][C|source|track]' +
119+                                       'hr[A][]' +
120+                                       'form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]' +
121                                        'fieldset[A|disabled|form|name][C|legend]' +
122-                                       'label[A|form|for|onfocus|onblur][B]' +
123-                                       'input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|' +
124-                                               'multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name|tabindex|onfocus|onblur|usemap|onselect|onchange|align][]' +
125-                                       'button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type|tabindex|onfocus|onblur][B]' +
126-                                       'select[A|autofocus|disabled|form|multiple|name|size|tabindex|onfocus|onblur|onchange][option|optgroup]' +
127+                                       'label[A|form|for][B]' +
128+                                       'input[A|type|accept|alt|autocomplete|autofocus|checked|dirname|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|inputmode|list|max|maxlength|min|multiple|name|pattern|placeholder|readonly|required|size|src|step|value|width|files][]' +
129+                                       'button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|type|value][B]' +
130+                                       'select[A|autofocus|disabled|form|multiple|name|required|size][option|optgroup]' +
131+                                       'data[A|value][B]' +
132                                        'datalist[A][B|option]' +
133                                        'optgroup[A|disabled|label][option]' +
134-                                       'option[A|disabled|selected|label|value][]' +
135-                                       'textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap|tabindex|onfocus|onblur|onselect|onchange][]' +
136+                                       'option[A|disabled|selected|label|value][#]' +
137+                                       'textarea[A|autocomplete|autofocus|cols|dirname|disabled|form|inputmode|maxlength|name|placeholder|readonly|required|rows|wrap][#]' +
138                                        'keygen[A|autofocus|challenge|disabled|form|keytype|name][]' +
139                                        'output[A|for|form|name][B]' +
140-                                       'canvas[A|width|height][]' +
141-                                       'map[A|name][B|C]' +
142-                                       'area[A|shape|coords|href|alt|target|media|rel|ping|type|tabindex|onfocus|onblur|nohref][]' +
143+                                       'canvas[A|width|height][a|button|input]' +
144+                                       'map[A|name][C|B]' +
145+                                       'area[A|alt|coords|shape|href|target|download|ping|rel|media|hreflang|type][]' +
146                                        'mathml[A][]' +
147                                        'svg[A][]' +
148-                                       'table[A|border|summary|width|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|colgroup|thead|tfoot|tbody|tr]' +
149-                                       'caption[A|align][C]' +
150-                                       'colgroup[A|span|width|align|char|charoff|valign][col]' +
151-                                       'col[A|span|width|align|char|charoff|valign][]' +
152-                                       'thead[A|align|char|charoff|valign][tr]' +
153-                                       'tfoot[A|align|char|charoff|valign][tr]' +
154-                                       'tbody[A|align|char|charoff|valign][tr]' +
155-                                       'tr[A|align|char|charoff|valign|bgcolor][th|td]' +
156-                                       'th[A|headers|rowspan|colspan|scope|abbr|axis|align|char|charoff|valign|nowrap|bgcolor|width|height][C]' +
157-                                       'td[A|headers|rowspan|colspan|abbr|axis|scope|align|char|charoff|valign|nowrap|bgcolor|width|height][C]' +
158-                                       'wbr[A][]' +
159-                                       'applet[id|class|style|title|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][C]' +
160-                                       'tt[A][B]' +
161-                                       'u[A][B]' +
162-                                       's[A][B]' +
163-                                       'strike[A][B]' +
164-                                       'big[A][B]' +
165-                                       'font[id|class|style|title|lang|xml:lang|dir|size|color|face][B]' +
166-                                       'basefont[id|size|color|face][]' +
167-                                       'acronym[A][C]' +
168-                                       'dir[A][li]' +
169-                                       'center[A][C]' +
170-                                       'noframes[A][C]' +
171-                                       'isindex[id|class|style|title|lang|xml:lang|dir|prompt][]'
172+                                       'table[A][caption|colgroup|thead|tfoot|tbody|tr]' +
173+                                       'caption[A][C]' +
174+                                       'colgroup[A|span][col]' +
175+                                       'col[A|span][]' +
176+                                       'thead[A][tr]' +
177+                                       'tfoot[A][tr]' +
178+                                       'tbody[A][tr]' +
179+                                       'tr[A][th|td]' +
180+                                       'th[A|headers|rowspan|colspan|scope][C]' +
181+                                       'td[A|headers|rowspan|colspan][C]' +
182+                                       'wbr[A][]'
183                        );
184                }
185 
186Index: wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
187===================================================================
188--- wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js       (revision 23147)
189+++ wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js       (working copy)
190@@ -135,12 +135,6 @@
191                                }
192                        });
193 
194-                       // Extend <object> and <embed> (#WP22790)
195-                       ed.onPreInit.add(function(ed) {
196-                               ed.schema.addValidElements('object[*],param[id|name|value|valuetype|type],embed[*]');
197-                               ed.schema.addValidChildren('+object[embed]');
198-                       });
199-
200                        ed.onInit.add(function(ed) {
201                                var bodyClass = ed.getParam('body_class', ''), body = ed.getBody();
202