| 1 | Index: src/ajax.js |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- src/ajax.js (revision 5709) |
|---|
| 4 | +++ src/ajax.js (working copy) |
|---|
| 5 | @@ -473,11 +473,11 @@ |
|---|
| 6 | data = filter( data, type ); |
|---|
| 7 | |
|---|
| 8 | // If the type is "script", eval it in global context |
|---|
| 9 | - if ( type == "script" ) |
|---|
| 10 | + if ( type == "script" || (ct && ct.indexOf("javascript") >= 0 )) |
|---|
| 11 | jQuery.globalEval( data ); |
|---|
| 12 | |
|---|
| 13 | // Get the JavaScript object, if JSON is used. |
|---|
| 14 | - if ( type == "json" ) |
|---|
| 15 | + if ( type == "json" || (ct && ct.indexOf("json") >= 0 )) |
|---|
| 16 | data = eval("(" + data + ")"); |
|---|
| 17 | |
|---|
| 18 | return data; |
|---|