Prototype 1.5.1.1 bug fix release
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!
Sorry, comments are closed for this article.


Comments
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
“@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.
Is the doc updated? I see a new String method isJSON(), but there is no doc for it.
Les, the documentation has been added. Thanx for the notification 8).
It seems that .up() is now broken in IE6/7.
@Joshua: Works for me. Make sure your element is extended (by running it through
$orElement.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.extendon every node in the document the first timedocument.getElementsByClassNamewas used. So it’s possible you’re relying on that behavior in your code.Is this feature in? It doesn’t work for me.
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.
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?
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!
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.
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.
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!
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?
In FF I get “too much recursion” on line 1323 when using Effect.Appear out of script.aculo.us.
Bobjpg:
$()returnsundefinedif the element isn’t present, soshould 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.
Yes, I used latest scriptaculous and that makes thing work.
Thanks
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());
... .. like it… i dont know.cya
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?
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!
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?
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’
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!
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.
qw: Please use the mailing list or irc for such issues.
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
People, please use the mailing list or irc for such issues.