1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Re-install blank trimming to have the xml test pass.

Note that the problem if far more complex. To be revisited.

modified:
  storage/connect/libdoc.cpp
  storage/connect/tabxml.h
This commit is contained in:
Olivier Bertrand
2013-02-20 23:23:35 +01:00
parent b63eb1d8b4
commit 9716acfcc3
2 changed files with 18 additions and 17 deletions

View File

@@ -469,12 +469,13 @@ char *XML2NODE::GetText(char *buf, int len)
xmlFree(Content);
if ((Content = xmlNodeGetContent(Nodep))) {
char *extra = " \t\r\n";
char *p1 = (char*)Content, *p2 = buf;
bool b = false;
// Copy content eliminating extra characters
for (; *p1 && (p2 - buf) < (len - 1); p1++)
if (strchr("\t\r\n", *p1)) {
for (; *p1 && (p2 - buf) < len; p1++)
if (strchr(extra, *p1)) {
if (b) {
// This to have one blank between sub-nodes
*p2++ = ' ';