WockyXmppReader seems to treat "<foo> </foo>" as equivalent to "<foo/>". This seems harmless, but... it breaks sending people messages containing only whitespace. It's surprising, and I think wrong, that if I send " " to a contact who uses Gabble, they don't actually get notified for the message I sent them. By contrast, the padding in "<body> hai </body>" is included in the node's content.
Here is a failing test case: http://git.collabora.co.uk/?p=user/wjt/wocky.git;a=commitdiff;h=refs/heads/whitespace-only-bodies
I think that this might be caused by Wocky not implementing the ignorableWhitespace xmlSAXHandler vfunc.
Well, the libxml2 documentation on this stuff is terrible. Even if I implement it, _ignorable_whitespace() is never called. Some searching threw up references to xmlKeepBlanksDefault(), but it appears to make no difference. I think we might be able to feed it a schema that mandates that all whitespace is significant, but I can't figure out how to do that right now.
ARGAHAGHAGHAGHAGHAGH RGAHGHAGHGHR GRAGHAGHAGHR _end_element_ns: if (priv->node && priv->node->content) { /* Remove content if it's purely whitespace */ const char *c; for (c = priv->node->content; *c != '\0' && g_ascii_isspace (*c); c++) ; if (*c == '\0') wocky_node_set_content (priv->node, NULL); } RGHghghgh
+" <message to='morse@met.police.uk' from='lewis@met.police.uk'> " \ I'm afraid Morse and Lewis were Oxfordshire police, and so weren't part of the Met. That should be thamesvalley.police.uk. Looks good otherwise.
Merged with that heinous error corrected!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.