diff -r 91127e62f38f -r d74ff822acc9 includes/clientside/static/autocomplete.js --- a/includes/clientside/static/autocomplete.js Tue Oct 09 16:14:55 2007 -0400 +++ b/includes/clientside/static/autocomplete.js Fri Oct 12 14:41:51 2007 -0400 @@ -160,7 +160,24 @@ thediv.id = id; unObj.onblur = function() { destroyUsernameDropdowns(); } - eval(ajax.responseText); + var response = String(ajax.responseText) + ' '; + if ( response.substr(0,1) != '{' ) + { + new messagebox(MB_OK|MB_ICONSTOP, 'Invalid response', 'Invalid or unexpected JSON response from server:
' + ajax.responseText + '
'); + return false; + } + + response = parseJSON(response); + var errorstring = false; + if ( response.mode == 'error' ) + { + errorstring = response.error; + } + else + { + var userlist = response.users_real; + } + if(errorstring) { html = ''+errorstring+'';