Fixes attributes always coming reversed, fixes #532, use double quotes in html output