Changeset 7988
- Timestamp:
- 10/22/07 11:20:21 (1 year ago)
- Files:
-
- spinoffs/prototype/trunk/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/trunk/src/ajax.js (modified) (1 diff)
- spinoffs/prototype/trunk/test/unit/ajax.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/trunk/CHANGELOG
r7986 r7988 1 1 *SVN* 2 3 * Make the Ajax.Response#headerJSON property correctly decode unicode characters. Closes #9285. [Marius Feraru, Tobie Langel] 2 4 3 5 * Make sure Event and Event.extend are defined before wrapping events and calling their handler. Prevents a known Firefox bug from throwing errors on page load/unload (cf.: https://bugzilla.mozilla.org/show_bug.cgi?id=361271). Closes #5393, #9421. [staaky, John Resig, sam, Tobie Langel] spinoffs/prototype/trunk/src/ajax.js
r7855 r7988 277 277 _getHeaderJSON: function() { 278 278 var json = this.getHeader('X-JSON'); 279 try { 280 return json ? json.evalJSON(this.request.options.sanitizeJSON) : null; 279 if (!json) return null; 280 json = decodeURIComponent(escape(json)); 281 try { 282 return json.evalJSON(this.request.options.sanitizeJSON); 281 283 } catch (e) { 282 284 this.request.dispatchException(e); spinoffs/prototype/trunk/test/unit/ajax.html
r7265 r7988 61 61 62 62 headerJson: { 63 'X-JSON': '{"test": 123}'63 'X-JSON': '{"test": "hello #éà "}' 64 64 } 65 65 }; … … 348 348 parameters: Fixtures.headerJson, 349 349 onComplete: function(transport, json) { 350 assertEqual( 123, transport.headerJSON.test);351 assertEqual( 123, json.test);350 assertEqual('hello #éà ', transport.headerJSON.test); 351 assertEqual('hello #éà ', json.test); 352 352 } 353 353 }));