Replace invalid characters in attribute value; fixes the error Unescaped '<' not allowed in attributes values Fixes #2534