Ticket #5746: 5746_2.patch
File 5746_2.patch, 1.9 KB (added by , 14 years ago) |
---|
-
_source/plugins/htmldataprocessor/plugin.js
84 84 delete blockLikeTags.pre; 85 85 var defaultDataFilterRules = 86 86 { 87 elements : {}, 87 88 attributeNames : 88 89 [ 89 90 // Event attributes (onXYZ) must not be directly set. They can become … … 240 241 }; 241 242 } 242 243 244 function protectReadOnly( element ) 245 { 246 element.attributes.contenteditable = "false"; 247 } 248 function unprotectReadyOnly( element ) 249 { 250 delete element.attributes.contenteditable; 251 } 252 // Disable form elements editing mode provided by some browers. (#5746) 253 for ( i in { input : 1, textarea : 1 } ) 254 { 255 defaultDataFilterRules.elements[ i ] = protectReadOnly; 256 defaultHtmlFilterRules.elements[ i ] = unprotectReadyOnly; 257 } 258 243 259 var protectAttributeRegex = /<(?:a|area|img|input)[\s\S]*?\s((?:href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi; 244 260 245 261 var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, -
_source/plugins/wysiwygarea/plugin.js
849 849 focusGrabber.clearCustomData(); 850 850 } ); 851 851 } 852 } 852 853 // Disable form elements editing mode provided by some browers. (#5746) 854 editor.on( 'insertElement', function ( evt ) 855 { 856 var element = evt.data; 857 if ( element.type = CKEDITOR.NODE_ELEMENT 858 && ( element.is( 'input' ) || element.is( 'textarea' ) ) ) 859 { 860 element.setAttribute( 'contentEditable', false ); 861 } 862 }, 10 ); 863 864 } 853 865 }); 854 866 855 867 // Fixing Firefox 'Back-Forward Cache' break design mode. (#4514)