new → pending
We're not creating those text nodes, the browser that is converting the text to HTML does that. Since we've been passing through text nodes created like that since jQuery 1.0 I don't think we'd want to change it.
$('<p id="test">test</p>' + "\\n" + '<p id="text">text</p>').closest('#text')
That doesn't make sense to do, so if it results in an error I am okay with it. Element selection won't return text nodes, only creating HTML from text. If you need to ensure that the top-level result of an HTML conversion only contains element nodes, you can use
$(html).filter("*"). That is essentially what I think you're advocating anyway, so you'll only need to pay the performance price when you really need it. http://jsfiddle.net/dmethvin/VwFUk/
What is the situation where you're encountering this?