Ticket #3441: 3441_2.patch
File 3441_2.patch, 2.0 KB (added by , 15 years ago) |
---|
-
_source/plugins/entities/plugin.js
135 135 136 136 htmlFilter.addRules( 137 137 { 138 text : function( text )138 text : function( text , tagName ) 139 139 { 140 return text.replace( entitiesRegex, getChar ); 140 // Ignore encode script/style tag contents. 141 return !( tagName == 'script' || tagName == 'style' ) ? 142 text.replace( entitiesRegex, getChar ) : text; 141 143 } 142 144 }); 143 145 } -
_source/core/htmlparser/text.js
12 12 * @constructor 13 13 * @example 14 14 */ 15 15 CKEDITOR.htmlParser.text = function( value ) 16 16 { 17 17 /** 18 18 * The text value. … … 46 46 { 47 47 var text = this.value; 48 48 49 if ( filter && !( text = filter.onText( text ) ) )49 if ( filter && !( text = filter.onText( text , this.parent ) ) ) 50 50 return; 51 51 52 52 writer.text( text ); -
_source/core/htmlparser/filter.js
56 56 { 57 57 return filterName( name, this._.attributeNames ); 58 58 }, 59 60 onText : function( text ) 59 60 /** 61 * Filtering text node content. 62 * @param {Object} text The text content. 63 * @param {CKEDITOR.htmlParser.element} element The context element. 64 */ 65 onText : function( text , element ) 61 66 { 62 67 var textFilter = this._.text; 63 return textFilter ? textFilter.filter( text ) : text;68 return textFilter ? textFilter.filter( text , element.name ) : text; 64 69 }, 65 70 66 71 onComment : function( commentText )