|
Connexion
News Rss |
Blog » Tobie Langel - Home
2007-05-15T20:15:00+02:00
| 4 reads
This one's pretty annoying:/(.)+/.test(string);This crashes Safari when string's length is bigger than about 7000 characters (your mileage may vary, it looks like the exact size is machine dependent, but its in that area on an intel MacBook).The cause of the crash seems to be the length of the grouping results, as this works fine:/.+/.test(string);UPDATE: Non-capturing parentheses do not solve this bug. So this:/(?:.)+/.test(string);will still crash Safari.This bug has some really annoying consequences. While we managed to fix some of them in the Prototype framework, it still leaves the issue of JSON sanitizing.Currently, this is done both in Prototype and in Douglas Crockford's original ...
2007-04-19T22:57:00+02:00
| 31 reads
Following my last post on a critical Safari's regexp bug (it actually crashes the browser), Andy Armstrong suggested a partial solution to the problem:Here's a tentative fix to JSON's sanitize regexp based on it:/^("(\.|[^"\\n\r]*)*?"|[,:{}[]0-9.\-+Eaeflnr-u \n\r\t]*)+?$/instead of the original:/^("(\.|[^"\\n\r])*?"|[,:{}[]0-9.\-+Eaeflnr-u \n\r\t])+?$/Although it does not entirely solve the problem, it does allow longer strings to be parsed without crashing Safari.Again, your mileage may vary depending on your machine.Here's a test-case for it.Any improvements, suggestions, etc. are warmly welcomed.
2007-04-20T06:52:00+02:00
| 6 reads
Rising back from the dead, the UI JavaScript library Rico just released a first beta of their upcoming version 2.0, which you can download from their website.It's based on the latest release of Prototype (version 1.5.1_rc2) which is included in the download.I am really, really happy to see this project alive again, as yet another example of the striving Prototype community.It's the best reward we could get for the work we've put into Prototype 1.5 and the documentation site.Thanks Richard for pursuing your great work and making it available to the community, and welcome to your new contributor: Matt Brown.
2007-04-24T10:16:00+02:00
| 3 reads
We've just released Prototype 1.5.1_rc3, here's what's new since release candidate 2:Bug fixesElement.addMethods now also again adds the methods to Element. [#7888]Form.request also works with forms containing an input element with name="action". [#8063]Safari no longer crashes on String#stripScripts and extractScripts with large <script>.Form.disable works again on non-form elements. [#6887]String#endsWith now always returns the correct value. [#7822]Ajax responses with no Content-type header are no longer evaluated. [#7827]Hash#toQueryString again serializes undefined values to ensure consitency with String#toQueryParams. [#7806]Various fixes of the $$() utility. [#7873], [#7901...
2007-05-07T19:37:00+02:00
| 10 reads
The web is a place full of surprises. And sometimes they aren't good ones. Most of you know jQuery, John Resig's excellent JavaScript library, well... the website it's hosted on has been the subject of DOS attack over the week-end, and its host kindly invited John to go look for hosting elsewhere.jQuery has now found a new host, (you might still encounter issues connecting to it while the DNS propagates), but the move was costly and Learning jQuery is still collecting funds to cover the move. Please consider chipping in a dime or two.
2007-05-12T02:54:00+02:00
| 2 reads
Seen on project.ioni.st today: The feeling I get when programming is at least as important as other factors when selecting a language. Chad FowlerThat's what I refer to as the gut factor. And which is what made me stick with Prototype when no documentation was available, updates were scarce, and people were migrating en masse to jQuery and YUI.Looking back, that was one of the wisest decisions I made: I learnt way more about JavaScript helping out with the documentation and joining the Core Team than I would have otherwise.What about you. What factors pushed you to adopt the language, framework, or library that your are using today ?
2007-05-14T13:47:00+02:00
| 3 reads
Christophe Proteneuve, one of my fellow Prototype Core Team, member, just published the first Beta Book of Prototype and script.aculo.us - You never knew JavaScript could do this! over at the Pragmatic Programmers. (You can read more about the whole beta book concept on their website).Affectionately dubbed "The Bungee Book" by Sam Stephenson-the master mind behind Prototype-Christophe's upcoming title is sure to become the reference for Prototype and Script.aculo.us developers across the world.I've had the chance to read through the first beta and all I can say is that you'd be just plain stupid not to grab a copy now: It's thorough, extremely well documented (no wonder, Christophe wrote ...
2007-05-17T04:13:00+02:00
| 4 reads
Just a hilarious Escher/Oscar Reutersvärd (yet another swede!) inspired snapshot stolen from Christian Heilmann's slides for his Seven Reasons for Code Bloat presentation for the WSG London Meet-up.Couldn't resist. Hope he doesn't mind.
2007-05-22T16:21:00+02:00
| 5 reads
Living on the edge and using Prototype's latest DOM Builder ? Feeling a bit dirty doing the following:new Element('div').update('some text...');// --> <div>some text...</div>Here's a quick solution (using Element.addMethods) to fully dwell in complete web-standardness:Element.addMethods({ appendText: function(element, text) { element = $(element); text = String.interpret(text); element.appendChild(document.createTextNode(text)); return element; }});Best part is that it lets you append anything, as long as the text argument has a toString method (thanks to Ash Searle for suggesting a better handling of null and undefined):new Element('div').appendText('Some more...
2007-06-04T00:30:00+02:00
| 1 reads
|