Re: A proposal to add String.prototype.format

2011-03-08 Thread Mark S. Miller
[+msamuel] I don't understand. I see that this proposal references quasis, but I don't see how it subsumes the safety quasis provide against quoting confusions, e.g., that lead to XSS and other injection vulnerabilities. What am I missing? On Wed, Mar 9, 2011 at 12:21 AM, Shanjian Li wrote: > E

A proposal to add String.prototype.format

2011-03-08 Thread Shanjian Li
EcmaScript lacks a method to format strings in a flexible and controllable manner. Most EcmaScript strings are constructed by concatenating a series of substrings. Such practice really hurts code readability. Especially for localization, it is almost impossible to translate the string when it is sp