Handle unclosed img tags correctly.