Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #4118 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Fix for Ajax.Request.evalJSON()

Reported by: bigsmoke@gmail.com Assigned to: sam
Priority: high Milestone:
Component: Prototype Version: 1.0.0
Severity: blocker Keywords:
Cc:

Description

Browser: Firefox 1.5.0.1

Ajax.Request.evalJSON() doesn't work as advertized, because the eval should surround the JSON string in parenthesis.

Attachments

evalJSON_fix.diff (339 bytes) - added by bigsmoke@gmail.com on 03/07/06 18:36:34.
The actual patch, which I inconveniently had to submit as a separate action

Change History

03/07/06 18:36:34 changed by bigsmoke@gmail.com

  • attachment evalJSON_fix.diff added.

The actual patch, which I inconveniently had to submit as a separate action

03/07/06 18:38:11 changed by bigsmoke@gmail.com

  • summary changed from [PATCH] to [PATCH] Fix for Ajax.Request.evalJSON().

03/18/06 22:44:48 changed by lukasl@ackleymedia.com

I spent the last 5 hours trying to figure this one out. After figuring it out I came here to see if I might be missing something but it looks like I'm not the only one that sees this as a bug.

Another way would be to include the brackets in the X-JSON header, but this patch makes more sense.

For now I'm adding the () brackets in PHP as well when creating the header but hope that this will be implemented in next revision so that things are cleaner.

04/04/06 13:53:31 changed by sam

  • status changed from new to closed.
  • resolution set to fixed.

(In [4148]) prototype: Surround values in the X-JSON header in parenthesis for better compatibility with Firefox. Closes #4118.