Ticket #2948: 2948.patch
File 2948.patch, 1.8 KB (added by , 15 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
66 66 if ( this.mode == 'wysiwyg' ) 67 67 { 68 68 var $doc = this.document.$; 69 var data = protectHtml( evt.data ); 69 70 70 71 if ( CKEDITOR.env.ie ) 71 $doc.selection.createRange().pasteHTML( evt.data );72 $doc.selection.createRange().pasteHTML( data ); 72 73 else 73 $doc.execCommand( 'inserthtml', false, evt.data );74 $doc.execCommand( 'inserthtml', false, data ); 74 75 } 75 76 }; 76 77 … … 81 82 return html.replace( protectCkeTagRegex, '$1cke:$2' ); 82 83 }; 83 84 // ### protectCkeTags - END 85 86 function protectHtml( html ) 87 { 88 // Prevent event attributes (like "onclick") to 89 // execute while editing. 90 if ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) 91 html = protectEvents( html ); 84 92 93 // Protect src or href attributes. 94 html = protectUrls( html ); 95 96 // Protect cke prefixed tags. 97 html = protectCkeTags( html ); 98 99 return html; 100 } 101 85 102 var onInsertElement = function( evt ) 86 103 { 87 104 if ( this.mode == 'wysiwyg' ) … … 299 316 if ( CKEDITOR.env.ie ) 300 317 data = data.replace( invalidSelfCloseTagsRegex, '$1></$2>' ); 301 318 302 // Prevent event attributes (like "onclick") to 303 // execute while editing. 304 if ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) 305 data = protectEvents( data ); 306 307 // Protect src or href attributes. 308 data = protectUrls( data ); 309 310 // Protect cke prefixed tags. 311 data = protectCkeTags( data ); 312 319 data = protectHtml( data ); 313 320 data = 314 321 editor.config.docType + 315 322 '<html dir="' + editor.config.contentsLangDirection + '">' +