Created
September 30, 2013 04:52
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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