Once upon a time I was asked to make some webpages, but in the files I was given all the HTML was generated by something that clearly never considered that a human being might be working on it later. I spent ten minutes looking for a non-shareware option for my Mac here. I might've found some viable options. I didn't really care. I just wanted an excuse to code up a parser in Lua.
I fixed a bug in an older version that caused it to gimp out when element attribute values weren't surrounded by quotes. I'm willing to bet it'll still gimp out if it runs into an escaped quote inside a value.