aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVojta Jina2011-11-04 18:02:47 -0700
committerIgor Minar2011-11-30 11:17:25 -0500
commit92995bbce9877673f2642addd22fdf08d47bd39e (patch)
treeb9cfb5d3508a0dfb58d6e91c2a601029bcc69517 /src
parentb9707d910e8dd354a2f684588c1e7d83c5f88b8a (diff)
downloadangular.js-92995bbce9877673f2642addd22fdf08d47bd39e.tar.bz2
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...
Diffstat (limited to 'src')
-rw-r--r--src/service/http.js2
1 files changed, 1 insertions, 1 deletions
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/;