Add test for #618, which was fixed in htmlparser2.

Closes #618.