fix 12051: close img tag
Merge pull request #2186 from mtbc/trac-12051-close-img-tag

fix #12051: close img tag (rebased)