It turns out that $(...).not(...) will in fact strip out text nodes from the result set. It doesn't select "things that are not matching elements"; it selects "elements that do not match". That's good to know.
The solution, of course, is to wrap the text node in a <span> element on the XMPP end.
It turns out that
$(...).not(...)
will in fact strip out text nodes from the result set. It doesn't select "things that are not matching elements"; it selects "elements that do not match". That's good to know.The solution, of course, is to wrap the text node in a
<span>
element on the XMPP end.