W3C home > Mailing lists > Public > public-web-security@w3.org > September 2010

String replace JavaScript bad design

From: gaz Heyes <gazheyes@gmail.com>
Date: Mon, 27 Sep 2010 12:26:20 +0100
Message-ID: <AANLkTi=t+z3PJWcaqcaaw2X7dPHM02_4wV1ymk4GXTj8@mail.gmail.com>
To: "public-web-security@w3.org" <public-web-security@w3.org>
Hi all

I'd just thought I'd share my post on JavaScript string.replace behaviour.
<
http://www.thespanner.co.uk/2010/09/27/string-replace-javascript-bad-design/
>

I consider the function to be badly designed (although an excellent function
overall). I've provided a JavaScript patch until (if ever) browsers change
it's behaviour. I also consider Mozilla's third argument a really bad idea
as this unsupported by the other browsers at this time and adding flags just
seems pretty messy and adds to the confusion.

Cheers

Gareth
Received on Monday, 27 September 2010 11:26:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:17 UTC