Ticket #9094: 9094.patch
File 9094.patch, 2.1 KB (added by , 13 years ago) |
---|
-
_source/core/dtd.js
48 48 L = X({a:1},J), 49 49 M = {tr:1}, 50 50 N = {'#':1}, 51 O = X({param:1 },K),51 O = X({param:1,embed:1},K), 52 52 P = X({form:1},A,D,E,I), 53 53 Q = {li:1}, 54 54 R = {style:1,script:1}, -
_source/core/htmlparser/fragment.js
212 212 213 213 parser.onTagOpen = function( tagName, attributes, selfClosing, optionalClose ) 214 214 { 215 var element = new CKEDITOR.htmlParser.element( tagName, attributes ); 215 var element = new CKEDITOR.htmlParser.element( tagName, attributes ), 216 dtdName = tagName; 216 217 218 // Reveal the real semantic of our internal custom tag name (#). 219 var internalTag = tagName.match( /^cke:(.*)/ ); 220 internalTag && ( dtdName = internalTag[ 1 ] ); 221 217 222 // "isEmpty" will be always "false" for unknown elements, so we 218 223 // must force it if the parser has identified it as a selfClosing tag. 219 224 if ( element.isUnknown && selfClosing ) … … 246 251 247 252 while( 1 ) 248 253 { 249 var currentName = currentNode.name; 254 var currentName = currentNode.name, 255 currentDtdName = currentName; 250 256 251 var currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ] 257 var internalTag = currentName && currentName.match( /^cke:(.*)/ ); 258 internalTag && ( currentDtdName = internalTag[ 1 ] ); 259 260 var currentDtd = currentName ? ( CKEDITOR.dtd[ currentDtdName ] 252 261 || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) 253 262 : rootDtd; 254 263 255 264 // If the element cannot be child of the current element. 256 if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] )265 if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ dtdName ] ) 257 266 { 258 267 // Current node doesn't have a close tag, time for a close 259 268 // as this element isn't fit in. (#7497)