webkit crash

HTML

<div id="div"></div>
<a href="#" onclick="makeitcrash()">click me to make me crash</a><br/>
<a href="#" onclick="makeitgoweird()">click me to have a single input rendered twice </a><br/>
<a href="#" onclick="makeitwork()">click me to make it work </a><br/>

CSS

div:empty {
    height: 9px; }

JavaScript

//Dynamically adding a login and password input field with autofocus on the login field to a div that is subject to the css that is shown.
function makeitcrash() {
    $('#div').html('<fieldset><div><label>Login</label><input autofocus name=\"1\" value=\"user\" type=\"text\"><\/div><div><label>Password</label><input type=\"text\" name=\"2\" value=\"pass\"></div></fieldset>');
}

//When leaving out the label, the password input field is rendered twice, but is present only once in the DOM!
function makeitgoweird() {
    $('#div').html('<fieldset><div><label>Login</label><input autofocus name=\"1\" value=\"user\" type=\"text\"><\/div><div><input type=\"text\" name=\"2\" value=\"pass\"></div></fieldset>');
}

//When leaving out the autofocus attribute of the login field, all is going well.
function makeitwork() {
    $('#div').html('<fieldset><div><label>Login</label><input name=\"1\" value=\"user\" type=\"text\"><\/div><div><label>Password</label><input type=\"text\" name=\"2\" value=\"pass\"></div></fieldset>');
}