Skip to content

Instantly share code, notes, and snippets.

@shu0115
Created September 30, 2013 04:52
Show Gist options
  • Save shu0115/6759494 to your computer and use it in GitHub Desktop.
Save shu0115/6759494 to your computer and use it in GitHub Desktop.
jQuery.uploadで「Uncaught SyntaxError: Unexpected token <」というエラーが出たら ref: http://qiita.com/shu_0115/items/c5bf6d5741bb62687583
switch (type) {
case 'xml':
data = parseXml(data);
break;
case 'json':
// 自動挿入タグ除去
data = data.replace(/<pre style="word-wrap: break-word; white-space: pre-wrap;">/g, '')
data = data.replace(/<pre>/g, '')
data = data.replace(/<\/pre>/g, '')
data = window.eval('(' + data + ')');
break;
}
return data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment