Before you used .text() here instead of .html(). This seems unnecessary since if the response is not JSON $.parseJSON would fail on .html() or .text(). Instead I pass the innerHTML, which is equivalent to $.html(), since innerText is not cross browser like innerHTML.