Fix issue with mixed unquoted and quoted attributes

A tag with mixed unquoted and quoted attributes would fail to escape
from the unquoted state, causing an error on the following attributes.

e.g.:

<div attr=1 attr="2" />

This was due to the space matching outside of any state, and the
unquoted breaking out of state on ".", which would never get matched
since the top-of-the-file matching for space would always take
precedence.