diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index baf700a..eed36c1 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -361,7 +361,10 @@ var response; try { - response = eval('(' + text + ')'); + if (typeof(JSON) != "undefined" && typeof(JSON.parse) != "undefined") + response = JSON.parse(text); + else + response = eval('(' + text + ')'); } catch (err) { return; }