The Dreaded INVALID_STATE_ERR: DOM Exception 11

Last month I had a strange problem in Chrome with Jquery, the chrome console launched me an INVALID_STATE_ERR:DOM 11 error. It happen when i tried to insert a string of HTML directly using $.html(). Other browsers didnt thrown any error,even IE where ok with that kind of indecent proposal i tried to reach.

So what was the problem with Mr Chrome?
The Exception 11 means teorically means that some objects doesnt exist, in practice it mean that you're creating DOM objects ( I means html tags) using jquery append(), html() or prepend() with semantics errors, like not closing the tags or something like that. So if you write bad html like $.html('<ul><li>HelloWorld</li></ul>'); , ( we did'nt close the li tag) there will be mayhem in Chrome.

And the solution?