Ticket #3874: 3874.patch
File 3874.patch, 3.0 KB (added by , 15 years ago) |
---|
-
_source/core/tools.js
(this hunk was shorter than expected) … … 227 227 return span.getHtml(); 228 228 }; 229 229 230 var fix1 = ( standard( ' >' ) == '>' ) ?230 var fix1 = ( standard( '\n' ).toLowerCase() == '<br>' ) ? 231 231 function( text ) 232 232 { 233 // #3874 IE and Safari encode line-break into <br> 234 return standard( text ).replace( /<br>/gi, '\n' ); 235 } : 236 standard; 237 238 var fix2 = ( standard( '>' ) == '>' ) ? 239 function( text ) 240 { 233 241 // WebKit does't encode the ">" character, which makes sense, but 234 242 // it's different than other browsers. 235 return standard( text ).replace( />/g, '>' );243 return fix1( text ).replace( />/g, '>' ); 236 244 } : 237 standard;245 fix1; 238 246 239 var fixNbsp = / /g; 240 var fix2 = ( standard( ' ' ) == ' ' ) ? 247 var fix3 = ( standard( ' ' ) == ' ' ) ? 241 248 function( text ) 242 249 { 243 250 // #3785 IE8 changes spaces (>= 2) to 244 return fix 1( text ).replace( fixNbsp, ' ' );251 return fix2( text ).replace( / /g, ' ' ); 245 252 } : 246 fix 1;247 248 this.htmlEncode = fix 2;253 fix2; 254 255 this.htmlEncode = fix3; 249 256 250 257 return this.htmlEncode( text ); 251 258 }, -
_source/tests/core/tools.html
9 9 <script type="text/javascript" src="../test.js"></script> 10 10 <script type="text/javascript"> 11 11 //<![CDATA[ 12 13 CKEDITOR.test.addTestCase( (function()12 var testcase; 13 CKEDITOR.test.addTestCase( testcase = (function() 14 14 { 15 15 // Local reference to the "assert" object. 16 16 var assert = CKEDITOR.test.assert; … … 77 77 assert.areSame( 'Test\'s & "quote"', CKEDITOR.tools.htmlEncode( 'Test\'s & "quote"' ) ); 78 78 }, 79 79 80 test_htmlEncode_3874 : function() 81 { 82 assert.areSame( 'line1\nline2', CKEDITOR.tools.htmlEncode( 'line1\nline2' ) ); 83 }, 84 80 85 test_cssStyleToDomStyle1 : function() 81 86 { 82 87 assert.areSame( 'backgroundColor', CKEDITOR.tools.cssStyleToDomStyle( 'background-color' ) ); … … 152 157 name : document.title 153 158 }; 154 159 })() ); 155 160 //window.onload = testcase.test_htmlEncode_3874; 156 161 //]]> 157 162 </script> 158 163 </head> -
CHANGES.html
88 88 <li><a href="http://dev.fckeditor.net/ticket/3825">#3825</a> : Fixed JS error when opening spellingcheck.</li> 89 89 <li><a href="http://dev.fckeditor.net/ticket/3862">#3862</a> : Fixed html parser infinite loop on certain malformed 90 90 source code.</li> 91 <li><a href="http://dev.fckeditor.net/ticket/3874">#3874</a> : Paste as plain text in Safari loosing lines.</li> 91 92 </ul> 92 93 <h3> 93 94 CKEditor 3.0 RC</h3>