Commit Graph

18 Commits

Author SHA1 Message Date
Sam Stephenson 44ef74813b prototype: Improvements for Element#replace, Element#update and Element#insert. Closes #7429, #9060. 2007-07-24 18:52:17 +00:00
Sam Stephenson ff45622e39 prototype: Template enhancements. Closes #8166. 2007-07-24 17:24:25 +00:00
Sam Stephenson 38fa39af92 prototype: Make String#scan explicitly return a string. Closes #6350. 2007-07-24 16:30:19 +00:00
Thomas Fuchs 9ff57b042d Prevent a crash in Safari when calling String#evalJSON(true) on very large strings. Add String#isJSON. Closes #7834. [Tobie Langel] 2007-06-17 16:03:38 +00:00
Thomas Fuchs 4cafec8a9c Prototype: String.prototype.truncate now explicitly converts its return value into a string if no truncation takes place. This prevents possible issues with methods expecting input data that is typeof == string. 2007-05-31 22:32:25 +00:00
Sam Stephenson 83b4b337e1 Merge -r6634:HEAD from ../branches/dom.
* Make Element#update and Element#insert work for SELECT tags in IE and Opera. [Tobie Langel]

* Make Element#insert and Element#update better handle TABLE related elements in IE and Opera. Closes #7776, #8040, #7550, #7776, #7938. [Tobie Langel]

* Make Element#readAttribute('title') work in Opera. [Tobie Langel]

* Make Element#replace work with form elements in Firefox and Safari. Closes #8010, #7989. [dsl239, Tobie Langel]

* Add Element#wrap which wraps the element inside a new one. Closes #5732. [P. Vande, Tobie Langel]

* Make Element into a constructor: new Element(tagName, attributes). Add Element#writeAttribute which accepts a hash of attributes or a name/value pair. Closes #7476. [Mislav Marohnić, haraldmartin, Tobie Langel]

* Insertion overhaul: Add Element.insert(content[, position = 'Bottom']). Deprecate Insertion (kept for backwards compatibility). Make Ajax.Updater option.insertion accept both Insertion.Top or the now preferred 'Top'. Closes #7907. [Tobie Langel]
2007-05-12 05:01:56 +00:00
Sam Stephenson fea6bc1a21 prototype: Automatically strip security delimiter comments from JSON strings before evaling them. The default delimiter is '/*-secure- ... */' or you can specify your own with the Prototype.JSONFilter regular expression. If you wrap your JSON response bodies in this delimiter on the server side, rogue external sites can't hijack potentially sensitive data via <script> tags. Closes #7910. 2007-04-24 03:31:14 +00:00
Thomas Fuchs c0509c7f5f Prototype: clean (un)escapeHTML IE special casing and optimize speed for IE and Safari 2007-03-29 17:39:48 +00:00
Thomas Fuchs 9a7dcd54fb Prevent linefeed normalisation in String.prototype.escapeHTML and unescapeHTML on IE for consistency with other browsers 2007-03-28 11:35:05 +00:00
Thomas Fuchs 5f2acb4be5 Make Hash.toQueryString serialize undefined values. Ensure consistency with String.prototype.toQueryParams. Closes #7806. [Mislav Marohnic] 2007-03-27 20:55:56 +00:00
Thomas Fuchs fc91a3e456 Fix an issue with String.prototype.endsWith. Closes #7822. [altblue] 2007-03-27 17:43:30 +00:00
Sam Stephenson fb0013a193 prototype: Give the parens some breathing room 2007-03-09 04:23:28 +00:00
Sam Stephenson f160bc4d4d prototype: Add support for JSON encoding and decoding. Closes #7427. 2007-03-09 03:23:24 +00:00
Thomas Fuchs 5224f0fc4f Prototype: Add String.prototype.empty and String.prototype.blank (tests if empty or whitespace-only). Closes #7016. [Jonathan Viney, Thomas Fuchs] 2007-02-19 21:32:37 +00:00
Sam Stephenson 74596ac289 prototype: String.prototype.endsWith should not fail on multiple occurrences. Closes #7416. 2007-02-05 04:56:46 +00:00
Sam Stephenson 5345085b33 prototype: Add String.prototype.startsWith, String.prototype.endsWith, and String.prototype.include. Closes #7075. 2007-01-27 18:45:54 +00:00
Sam Stephenson c556c89627 prototype: Improve performance of String.prototype.escapeHTML by using a cached div and text node. Closes #6937. 2007-01-27 18:33:03 +00:00
Sam Stephenson bb4d189b37 prototype: Reorganize the source tree. 2007-01-18 22:24:27 +00:00