IDEA-113332 Typing an attribute in XML/HTML files ends up with corrupted XML
(cherry picked from commit c4f7d79)