Closed M-U-X closed 2 years ago
Take this example message:
<tag1><tag2><tag3>...data...</tag3></tag2></tag1>
Now say Riot decides to split it in the middle of the data, there would be two messages:
<tag1><tag2><tag3>...data...
...data...</tag3></tag2></tag1>
Note the first tag has the same amount of <
and >
.
Even checking for an even number of tags doesn't work when you take into consideration self-closing <tags />
.
Why isn't a simple check for a matching number of opening and closing "<>" then checking if the tags "openning closing" match, enough to detect chunked messages sent by riot's xmpp server, am I missing something regarding xml or anything else, if it's because it would fail if someone sent a message containing those elements, they are encoded as "<" & so on?