From 92995bbce9877673f2642addd22fdf08d47bd39e Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Fri, 4 Nov 2011 18:02:47 -0700 Subject: fix($http): default json transformation should not crash on angular template The way we determine whether it's json is lame anyway. We need to change that. We should probably check the content type header... --- src/service/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/service/http.js b/src/service/http.js index 049dbd50..6efe7474 100644 --- a/src/service/http.js +++ b/src/service/http.js @@ -61,7 +61,7 @@ function transform(data, fns, param) { * @description */ function $HttpProvider() { - var JSON_START = /^\s*[\[\{]/, + var JSON_START = /^\s*(\[|\{[^\{])/, JSON_END = /[\}\]]\s*$/, PROTECTION_PREFIX = /^\)\]\}',?\n/; -- cgit v1.2.3