Fixed "name" attribute collision

Form submitting fails when there is an element with [name="name"] in the
form. Instead of passing the [name] attribute of the form to the
function, the whole element string is passed (e.g. <input type="text"
name="name">).