the br/br comes from the fact that the parser matches a quoted string, but the grammar doesn't allow a quoted string in there and behind the scenes throws an error. It tries to fix it but the br/br commands are still converted and not transfered to <br><br>. Yeah I do hate that parser as much as you do . Altering the grammar to allow the string there could help, but can also throw numerous other errors elsewhere.
The " stuff comes from the XML document I guess. I read the project file into an Xml document and manipulate some nodes there. You'd expect that quotes read would be written back normally, but no, Xml has to show how big of a misery it really is. I'm not sure what I have to do to this to fix it, perhaps there is a setting in the xmldocument but I'm thinking of dumping it in a string first and replace " with " and < with '>' etc.
(trying to fix the quote issue in the parser I saw what's wrong: the parser sees the first quote and then matches the second one with the first quote of the string you copied from the project file, with the two brakes. I added a dummy quote to fix it.