|
Connexion
News Rss |
Blog » Tobie Langel - Home
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-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.
2010-02-14T12:04:23+01:00
| 7 reads
(cross-posted from the official Prototype blog)I'm very happy to announce a new addition to the Prototype bookshelf: core committer Andrew Dupont's Practical Prototype and script.aculo.us published by Apress.Obviously, Practical Prototype and script.aculo.us covers all you need to know about the latest versions of Prototype and script.aculo.us. But it goes well beyond that. Andrew does an awesome job at setting the context and giving appropriate background information, so much so that you'll end up knowing not only the how but also the why. In the ruthless world of client-side development, that's serious asset!Practical Prototype and script.aculo.us is a pleasure to read - the style is bo...
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-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...
2010-06-07T18:03:31+02:00
| 5 reads
(cross-posted from the official Prototype blog)I'm very happy to announce a new addition to the Prototype bookshelf: core committer Andrew Dupont's Practical Prototype and script.aculo.us published by Apress.Obviously, Practical Prototype and script.aculo.us covers all you need to know about the latest versions of Prototype and script.aculo.us. But it goes well beyond that. Andrew does an awesome job at setting the context and giving appropriate background information, so much so that you'll end up knowing not only the how but also the why. In the ruthless world of client-side development, that's serious asset!Practical Prototype and script.aculo.us is a pleasure to read - the style is bo...
2010-12-29T00:44:54+01:00
| 5 reads
(cross-posted from the official Prototype blog)I'm very happy to announce a new addition to the Prototype bookshelf: core committer Andrew Dupont's Practical Prototype and script.aculo.us published by Apress.Obviously, Practical Prototype and script.aculo.us covers all you need to know about the latest versions of Prototype and script.aculo.us. But it goes well beyond that. Andrew does an awesome job at setting the context and giving appropriate background information, so much so that you'll end up knowing not only the how but also the why. In the ruthless world of client-side development, that's serious asset!Practical Prototype and script.aculo.us is a pleasure to read - the style is bo...
2011-02-17T17:28:13+01:00
| 5 reads
(cross-posted from the official Prototype blog)I'm very happy to announce a new addition to the Prototype bookshelf: core committer Andrew Dupont's Practical Prototype and script.aculo.us published by Apress.Obviously, Practical Prototype and script.aculo.us covers all you need to know about the latest versions of Prototype and script.aculo.us. But it goes well beyond that. Andrew does an awesome job at setting the context and giving appropriate background information, so much so that you'll end up knowing not only the how but also the why. In the ruthless world of client-side development, that's serious asset!Practical Prototype and script.aculo.us is a pleasure to read - the style is bo...
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-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. |