Ticket #4609: 4609_2.patch

File 4609_2.patch, 2.1 KB (added by Garry Yao, 14 years ago)
  • _source/core/htmlparser/element.js

     
    3535        this.children = [];
    3636
    3737        var dtd                 = CKEDITOR.dtd,
    38                 isBlockLike     = !!( dtd.$block[ name ] || dtd.$listItem[ name ] || dtd.$tableContent[ name ] ),
     38                isBlockLike     = !!( dtd.$block[ name ] || dtd.$listItem[ name ] || dtd.$tableContent[ name ] || dtd.$nonEditable ),
    3939                isEmpty         = !!dtd.$empty[ name ];
    4040
    4141        this.isEmpty    = isEmpty;
  • _source/core/dtd.js

     
    9797                 * @type Object
    9898                 * @example
    9999                 */
    100                 $nonEditable : {applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1},
     100                $nonEditable : {applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1},
    101101
    102102                /**
    103103                 * List of elements that can be ignored if empty, like "b" or "span".
  • _source/plugins/htmldataprocessor/plugin.js

     
    209209        var protectStyleTagsRegex = /<(style)(?=[ >])[^>]*>[^<]*<\/\1>/gi;
    210210        var encodedTagsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi;
    211211        var protectElementNamesRegex = /(<\/?)((?:object|embed|param).*?>)/gi;
    212         var protectSelfClosingRegex = /<cke:param(.*?)\/>/gi;
     212        var protectSelfClosingRegex = /<cke:(param|embed)(.*?)[/]?>/gi;
    213213
    214214        function protectStyleTagsMatch( match )
    215215        {
     
    226226        }
    227227        function protectSelfClosingElements( html )
    228228        {
    229                 return html.replace( protectSelfClosingRegex, '<cke:param$1></cke:param>' );
     229                return html.replace( protectSelfClosingRegex, '<cke:$1$2></cke:$1>' );
    230230        }
    231231
    232232        function unprotectEncodedTagsMatch( match, encoded )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy