Prototype 1.5.1.1 bug fix release

by Mislav | June 19th, 2007

Prototype 1.5.1.1 is now available for download. This is a bug fix release that prevents crashes with versions 1.3 and 2.0.x of the Safari browser. We urge everyone using Prototype 1.5.1 to upgrade to this latest release.

Previous versions of Prototype could trigger bugs in Safari's regular expression engine when updating elements with HTML containing <script> tags or when using JSON functionality with built-in security checks. These regular expression engine bugs affect Safari versions 1.3 through 2.0.4, but not Safari 3 beta or the WebKit nightlies. We've managed to code around them to prevent either browser crashing while maintaining the full API, keeping the performance top-notch and assuring backwards-compatibility.

Prototype 1.5.1.1 is a drop-in replacement for anyone using 1.5.1. Please upgrade now!

Comments

  1. AMA3 #

    Is there a dev build with the Element construction and writeAttribute() functionality of /assets/2007/5/12/prototype-dev-6728.js that also includes these bug fixes?

    Thanks, AMA3

    June 19th, 2007 @ 09:04 PM
  2. Andrew Dupont #

    @AMA3: These fixes have been also been applied to trunk—you can checkout our source code and build your own copy. There are instructions on the download page.

    June 19th, 2007 @ 09:37 PM
  3. Les #

    Is the doc updated? I see a new String method isJSON(), but there is no doc for it.

    June 20th, 2007 @ 08:13 AM
  4. jdalton #

    Les, the documentation has been added. Thanx for the notification 8).

    June 20th, 2007 @ 10:27 AM
  5. Joshua Rudd #

    It seems that .up() is now broken in IE6/7.

    June 20th, 2007 @ 12:21 PM
  6. Andrew Dupont #

    @Joshua: Works for me. Make sure your element is extended (by running it through $ or Element.extend) before you try to call any instance methods on it.

    1.5.1.1 fixes a significant performance issue with IE — it’d call Element.extend on every node in the document the first time document.getElementsByClassName was used. So it’s possible you’re relying on that behavior in your code.

    June 20th, 2007 @ 12:39 PM
  7. Les #

    Is this feature in? It doesn’t work for me.

    • Add Hash.prototype.index which returns the first found property that has a specific value. Closes #8528. [Thomas Fuchs, slusarz, Mislav Marohnić] Examples: var hash = $H({a:1,b:’2’}); hash.index(1) // -> ‘a’ hash.index(‘1’) // -> undefined
    June 20th, 2007 @ 03:07 PM
  8. Tobie Langel #

    Les: no. This is part of a future release of Prototype. There hasn’t been any new features implemented in 1.5.1.1, it is a bug fix release only.

    June 20th, 2007 @ 05:05 PM
  9. x-ray #
    I encountered a problem when upgrading my code from 1.5.0 to 1.5.1(.1).
    array.each( function(item) {...});

    In 1.5.0 function(item) got the same scope as array.each(...), but after upgrading to 1.5.1(.1) it loses scope.

    Does anyone know why?

    June 21st, 2007 @ 04:57 AM
  10. Chu Yeow #

    Wow, and we were totally baffled over why Safari 2 and 1 users were experiencing crashes (it’s OK in Safari 3 beta). Thanks for the fix!

    June 21st, 2007 @ 06:10 AM
  11. Tobie Langel #

    x-ray: This will be best answered in the mailing list.

    Chu Yeow: Yes, these regexp bugs were baffling, unheard of and took us all by surprise. Other libraries (json.js, mootools, Dean Edward’s Base) were also affected by them.

    June 21st, 2007 @ 12:28 PM
  12. Daniel Elmore #

    Wow, you guys are on top of your game. I don’t see Safari 3 having majority for a good while, so many thanks to the prototype team.

    June 24th, 2007 @ 06:23 AM
  13. soso #

    It was a surprise for me to discover the new layout change of the website of the prototype framework! I just wanted to congratulate the team for their work making a cross-browsing JS framework. It made me love javascripting for real… : ) This blog and the new site makes this framework more “profesional”. Keep up the good work!

    June 25th, 2007 @ 10:21 AM
  14. Bobjpg #

    Hello all, great work: your framework is a reference…

    Is there a way to test an html existance using is id?

    i am just using the test: if($(‘theid’)){ // do something }

    -> and it doesn’t work…

    a function “doesExist(id)” will be great? no?

    June 26th, 2007 @ 08:40 AM
  15. Sam #

    In FF I get “too much recursion” on line 1323 when using Effect.Appear out of script.aculo.us.

    June 29th, 2007 @ 07:23 PM
  16. Tobie Langel #

    Bobjpg: $() returns undefined if the element isn’t present, so

    if ($(‘theid’)) {
      // do something
    }

    should definitely work. If you’re having issues, you’re probably doing something wrong somewhere: try posting your problem on the mailing list to get help.

    Sam: you must be using an outdated version of script.aculo.us. Please download the latest version and all should be fine.

    June 30th, 2007 @ 12:17 AM
  17. Los Angeles Search Engine Optimization #

    Yes, I used latest scriptaculous and that makes thing work.

    Thanks

    June 30th, 2007 @ 03:21 AM
  18. Nagib #

    Thnks…

    I have 2 ideas… one is Element.create(); or alias $C(); its more for IE. because when you use document.createElement() you need to use $ like $(document.createElement());

    ...
    
      },
      create: function (tag) {
        var element = $(document.createElement(tag));
        return element;
      },
    
    .. like it… i dont know.

    cya

    July 2nd, 2007 @ 07:04 AM
  19. Chris #

    When upgrading from Prototype 1.5.0_rc0 and Scriptaculous 1.6.2 to Prototype 1.5.1.1 and Scriptaculous 1.7.1_beta3 I’m now getting a Hash.toQueryString is not a function error…any ideas?

    July 11th, 2007 @ 12:47 AM
  20. Chris Danielson #

    Excellent patch. One of our customers has been having issues with Safari and this patch works like a charm. Thank you for all your efforts!

    July 11th, 2007 @ 01:27 PM
  21. qw #

    I have a question.why almost half of the codes are blue when I open it with Dreamwaver from v1.5.1?Is it means they are useless?

    July 12th, 2007 @ 03:56 AM
  22. DNV #

    IE. if in style.css element hidden {style:display}

    $(el).show() doesn’t show element. bug fix: find line $(element).style.display = ’’ and replace with $(element).style.display = ‘block’

    July 12th, 2007 @ 04:54 AM
  23. Tobie Langel #

    Nagib: we have something much better in the works: check this out!

    Chris: posting a comment here isn’t the best way to get helped, try our mailing list instead.

    qw: Dreamweaver’s parser evidently got mixed up. Try opening Prototype in a more trustworthy application, you’ll get nicely colored syntax!

    DNV: Please search trac, this issue has come up and has been discussed many times already.

    Chris Danielson: Happy to hear this release fixed your issues!

    July 12th, 2007 @ 08:54 AM
  24. qw #

    thanks. ............... there is an error when I ues “Ajax.Request”. my codes:

    file:default.htm

    function recordPosistion(x,y){ var pars=”ix=”x“iy=”+y; var myAjax=Ajax.Request(“record.aspx”,{method:”get”,parameters:pars,onComplete:showRes}); }//onDragend.what to get div’s posistion. function showRes(res){ alert(res.responseText); }

    flie:record.aspx.cs

    Request.Q…[“ix”];//result:got null

    I can mail you full codes if it is necessary.

    July 13th, 2007 @ 06:48 AM
  25. Tobie Langel #

    qw: Please use the mailing list or irc for such issues.

    July 13th, 2007 @ 09:18 AM
  26. SSJ #

    I got error on IE7: Operation aborted, don’t know how to fix that. Tried to put defered, it helped out with Operation aborted, but braked ajax.updater tu update div’s

    Thanks

    July 19th, 2007 @ 01:51 PM
  27. Tobie Langel #

    People, please use the mailing list or irc for such issues.

    July 19th, 2007 @ 02:04 PM

Sorry, comments are closed for this article.

Search Blog


Search the prototype blog.

Subscribe to the blog

Akismet badge