Good question.
The reason why it happens for the ConfigManager, but not for the code snippets plugin is that you save your Data as attribute, while ConfigManager saves its data as string data.
Now... I know why it is
different for you and me, but I don't know why it is not escaped... in my opinion, it
should be. I am asking TinyXML to attach a string node to the DOM and pass an UTF-8 string to be filled in. I am not asking the library to insert an arbitrary string into the xml text, but to store it in a node.
So... uh... I guess this should actually modify the DOM in whatever way is appropriate. Then later, when the DOM is converted to a xml text document, the string data (whatever it is), should be properly escaped? That's what I would expect to happen, at least. Maybe I am wrong.
However, I dare not ask Lee about it, because I already bugged him with a TinyXML problem last week which turned out to be my fault...
After updating TinyXML from 2.4.2 to 2.5.2, I suddenly found Code::Blocks crashing for no apparent reason (did not change one line of code otherwise). Stepping through the code the next morning, I found that it obviously
had to crash, as my code was obviously dereferencing a null pointer.
Indeed, I was surprised that it ever worked. There is no way ConfigManager could ever
not have crashed at startup... but as it happens, the very same piece of Code has been working fine since November 2005.
So, it is kind of embarassing if you email someone and ask him "erm, any idea why this latest version of your library crashes?" and then it turns out it was your code... :lol: