The GEDCOM file that I create for import into WikiTree is one that strictly obeys the GEDCOM 5.5 standard. Moreover, it is of the simplest kind one can imagine. It contains neither structured EVENt fields nor SOURces. Each INDIvidual record only contains one or more NAME fields, a single BIRTh field, a single NOTE field (with continuation lines), and a single DEATh event, all without SOURces.
In a GEDCOM file, each line consists of a level number, tag and a string of any printable characters, including characters <, >, /, r, e, f. No system that claims to be able to import GEDCOM should complain about it. Indeed, WikiTree did not complain about invalid GEDCOM. Instead, as I said in my first mail, the text that WikiTree had created from the imported file to be put into the biography of an INDIvidual was corrupted such that that the last </ref> appearing in the NOTE field (with continuation lines) of the INDIvidual was changed to <ref>, for some strange reason, leading to a complaint about unmatching pairs of <ref>s and </ref>s when saving.