Changeset 6501
- Timestamp:
- 04/03/07 22:21:58 (1 year ago)
- Files:
-
- spinoffs/prototype/trunk/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/trunk/src/prototype.js (modified) (1 diff)
- spinoffs/prototype/trunk/test/unit/dom.html (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/trunk/CHANGELOG
r6489 r6501 1 1 *SVN* 2 3 * Prevent a crash on Safari on String.prototyype.stripScripts and extractScripts with large <script> tags. [Thomas Fuchs] 2 4 3 5 * Prevent linefeed normalisation in String.prototype.escapeHTML and unescapeHTML on IE for consistency with other browsers. Speed optimizations for Safari and IE. [Thomas Fuchs] spinoffs/prototype/trunk/src/prototype.js
r6489 r6501 18 18 }, 19 19 20 ScriptFragment: ' (?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',20 ScriptFragment: '<script[^>]*>([\u0001-\uFFFF]*?)</script>', 21 21 emptyFunction: function() {}, 22 22 K: function(x) { return x } spinoffs/prototype/trunk/test/unit/dom.html
r6475 r6501 271 271 // <![CDATA[ 272 272 273 var testVar = 'to be updated' ;273 var testVar = 'to be updated', testVar2 = ''; 274 274 275 275 Element.addMethods("LI", { … … 365 365 366 366 testElementUpdateWithScript: function() {with(this) { 367 $('testdiv').update('hello from div!<script> testVar="hello!"</'+'script>');367 $('testdiv').update('hello from div!<script>\ntestVar="hello!";\n</'+'script>'); 368 368 assertEqual('hello from div!',$('testdiv').innerHTML); 369 369 wait(100,function(){ … … 376 376 wait(100,function(){ 377 377 assertEqual('another hello!',testVar); 378 379 Element.update('testdiv','a\n<script>testVar="a"\ntestVar="b"</'+'script>'); 380 wait(100,function(){ 381 assertEqual('b', testVar); 382 383 Element.update('testdiv', 384 'x<script>testVar2="a"</'+'script>\nblah\n'+ 385 'x<script>testVar2="b"</'+'script>'); 386 wait(100,function(){ 387 assertEqual('b', testVar2); 388 }); 389 }); 378 390 }); 379 391 }); … … 935 947 assertEqual("orange juice", elem.orangeJuice()); 936 948 assertEqual("orange juice", elem2.orangeJuice()); 937 }} 949 }}, 950 951 testScriptFragment: function() {with(this) { 952 var element = document.createElement('div'); 953 // tests an issue with Safari 2.0 crashing when the ScriptFragment 954 // regular expression is using a pipe-based approach for 955 // matching any character 956 ['\r','\n',' '].each(function(character){ 957 $(element).update("<script>"+character.times(10000)+"</scr"+"ipt>"); 958 assertEqual('', element.innerHTML); 959 }); 960 $(element).update("<script>var blah='"+'\\'.times(10000)+"'</scr"+"ipt>"); 961 assertEqual('', element.innerHTML); 962 }} 938 963 }, 'testlog'); 939 964