Ticket #3585: 3585_3.patch
File 3585_3.patch, 1.8 KB (added by , 15 years ago) |
---|
-
_source/tests/core/htmlparser/fragment.html
151 151 '<p><b>Test</b></p><script type="test">var a = "<A Href=xxx>Testing</ A>";\nGo();<\/script>' ); 152 152 }, 153 153 154 test_ticket_3585 : function() 155 { 156 testParser( '<p><br />\t\r\n</p>', 157 '<p><br /></p>' ); 158 }, 159 160 test_ticket_3585_1 : function() 161 { 162 testParser( '<p><br />text\t\r\n</p>', 163 '<p><br />text</p>' ); 164 }, 165 166 167 test_ticket_3585_2 : function() 168 { 169 testParser( '<b>inline </b>\n<p>paragraph\t\r\n</p>\t\r\n', 170 '<p><b>inline </b></p><p>paragraph</p>' ); 171 }, 172 154 173 name : document.title 155 174 }; 156 175 })() ); 157 176 158 177 // Uncomment the following to run a single test. 159 // window.onload = tc.test_ticket_3 195_2;178 // window.onload = tc.test_ticket_3585_2; 160 179 161 180 //]]> 162 181 </script> -
_source/core/htmlparser/fragment.js
116 116 currentNode = savedCurrent; 117 117 } 118 118 119 // Rtrim empty spaces on block end boundary. (#3585) 120 if ( element._.isBlockLike ) 121 { 122 123 var length = element.children.length, 124 lastChild = element.children[ length - 1 ], 125 text; 126 if ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT ) 127 { 128 if ( !( text = CKEDITOR.tools.rtrim( lastChild.value ) ) ) 129 element.children.length = length -1; 130 else 131 lastChild.value = text; 132 } 133 } 134 119 135 target.add( element ); 120 136 121 137 if ( element.returnPoint )