| 143 | | tdAttr = commonAttr + '|abbr|axis|headers|scope|rowspan|colspan|char|charoff|align|valign|halign|nowrap|bgcolor|width|height'; |
| 144 | | // Obsolete table attributes |
| 145 | | ed.schema.addValidElements('table['+commonAttr+'|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor]'); |
| 146 | | // Obsolete tr attributes |
| 147 | | ed.schema.addValidElements('tr['+commonAttr+'|align|char|charoff|valign|halign|bgcolor]'); |
| 148 | | // Obsolete td and th attributes |
| 149 | | ed.schema.addValidElements('td['+tdAttr+'],th['+tdAttr+']'); |
| 150 | | // Adds "name" for <a> |
| 151 | | ed.schema.addValidElements('a['+commonAttr+'|href|target|ping|rel|media|type|name]'); |
| 152 | | // Extend <object> and <embed> |
| 153 | | ed.schema.addValidElements('object[*],param[id|name|value|valuetype|type],embed[*]'); |
| | 142 | tdAttr = commonAttr + '|abbr|axis|headers|scope|rowspan|colspan|char|charoff|align|valign|halign|nowrap|bgcolor|width|height', |
| | 143 | html4Attr = 'id|class|style|title|lang|xml::lang|dir|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup'; |
| | 144 | |
| | 145 | ed.schema.addValidElements( |
| | 146 | // HTML 4.0 tags that are obsolete in HTML 5.0 |
| | 147 | 'applet[id|class|style|title|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace],' + |
| | 148 | 'tt['+html4Attr+'],' + |
| | 149 | 'u['+html4Attr+'],' + |
| | 150 | 's['+html4Attr+'],' + |
| | 151 | 'strike['+html4Attr+'],' + |
| | 152 | 'big['+html4Attr+'],' + |
| | 153 | 'font[id|class|style|title|lang|xml::lang|dir|size|color|face],' + |
| | 154 | 'basefont[id|size|color|face],' + |
| | 155 | 'acronym['+html4Attr+'],' + |
| | 156 | 'dir['+html4Attr+'|compact],' + |
| | 157 | 'center['+html4Attr+'],' + |
| | 158 | 'noframes['+html4Attr+'],' + |
| | 159 | 'isindex[id|class|style|title|lang|xml::lang|dir|prompt],' + |
| | 160 | |
| | 161 | // HTML 4.0 attributes that are obsolete in HTML 5.0 |
| | 162 | 'table['+commonAttr+'|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor],' + |
| | 163 | 'thead['+commonAttr+'|align|char|charoff|valign],' + |
| | 164 | 'tfoot['+commonAttr+'|align|char|charoff|valign],' + |
| | 165 | 'tbody['+commonAttr+'|align|char|charoff|valign],' + |
| | 166 | 'tr['+commonAttr+'|align|char|charoff|valign|halign|bgcolor],' + |
| | 167 | 'td['+tdAttr+'],' + |
| | 168 | 'th['+tdAttr+'],' + |
| | 169 | 'p['+commonAttr+'|align],' + |
| | 170 | 'a['+commonAttr+'|href|target|ping|rel|media|type' + '|tabindex|onfocus|onblur|charset|name|hreflang|rev|shape|coords],' + |
| | 171 | 'br['+commonAttr+'|clear],' + |
| | 172 | 'h1['+commonAttr+'|align],' + |
| | 173 | 'h2['+commonAttr+'|align],' + |
| | 174 | 'h3['+commonAttr+'|align],' + |
| | 175 | 'h4['+commonAttr+'|align],' + |
| | 176 | 'h5['+commonAttr+'|align],' + |
| | 177 | 'h6['+commonAttr+'|align],' + |
| | 178 | 'img['+commonAttr+'|alt|src|height|width|usemap|ismap' + '|name|longdesc|align|border|hspace|vspace],' + |
| | 179 | 'iframe['+commonAttr+'|name|src|height|width|sandbox|seamless' + '|longdesc|frameborder|marginwidth|marginheight|scrolling|align],' + |
| | 180 | 'input['+commonAttr+'|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|' + |
| | 181 | 'multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name' + '|tabindex|onfocus|onblur|usemap|onselect|onchange|align],' + |
| | 182 | 'select['+commonAttr+'|autofocus|disabled|form|multiple|name|size' + '|tabindex|onfocus|onblur|onchange],' + |
| | 183 | 'textarea['+commonAttr+'|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap' + '|tabindex|onfocus|onblur|onselect|onchange],' + |
| | 184 | 'label['+commonAttr+'|form|for' + '|onfocus|onblur],' + |
| | 185 | 'button['+commonAttr+'|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type' + '|tabindex|onfocus|onblur],' + |
| | 186 | 'div['+commonAttr+'|align],' + |
| | 187 | 'ul['+commonAttr+'|type|compact],' + |
| | 188 | 'ol['+commonAttr+'|start|reversed' + '|type|compact],' + |
| | 189 | 'li['+commonAttr+'|value' + '|type],' + |
| | 190 | 'dl['+commonAttr+'|compact],' + |
| | 191 | 'menu['+commonAttr+'|type|label' + '|compact],' + |
| | 192 | 'pre['+commonAttr+'|width|xml:space],' + |
| | 193 | 'hr['+commonAttr+'|align|noshade|size|width],' + |
| | 194 | 'legend['+commonAttr+'|align],' + |
| | 195 | 'caption['+commonAttr+'|align],' + |
| | 196 | 'col['+commonAttr+'|span' + '|width|align|char|charoff|valign],' + |
| | 197 | 'colgroup['+commonAttr+'|span' + '|width|align|char|charoff|valign],' + |
| | 198 | 'form['+commonAttr+'|accept-charset|action|autocomplete|enctype|method|name|novalidate|target' + '|onsubmit|onreset|accept],' + |
| | 199 | 'area['+commonAttr+'|shape|coords|href|alt|target|media|rel|ping|type' + '|tabindex|onfocus|onblur|nohref],' + |
| | 200 | 'body['+commonAttr+'|onload|onunload|background|bgcolor|text|link|vlink|alink],' + |
| | 201 | |
| | 202 | // Extended <object> and <embed> |
| | 203 | 'object[*],' + |
| | 204 | 'param[id|name|value|valuetype|type],' + |
| | 205 | 'embed[*]' |
| | 206 | ); |
| | 207 | |