defunkt/jquery-pjax — pull request #324 by layerssss (2013-10-06 04:13:31+00:00)
Title: avoid lossing body when parsing html

* as http://api.jquery.com/jQuery/#jQuery2 stats, the parsing process
may strip `body` element, and return children of `body` instead of
body. And his happenes in most modern browsers.

'''
When passing in complex HTML, some browsers may not generate a DOM that
exactly replicates the HTML source provided. As mentioned, jQuery uses
the browser"s .innerHTML property to parse the passed HTML and insert
it into the current document. During this process, some browsers filter
out certain elements such as ,

, or <head> elements. As
a result, the elements inserted may not be representative of the
original string passed.
```

* Also fixed the corresponding unit test.