Improve handling for non-XML angle brackets