summaryrefslogtreecommitdiff
path: root/storage/connect/libdoc.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-02-20 23:23:35 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2013-02-20 23:23:35 +0100
commit9716acfcc3a7dfbd3ee55fe55c28937eac2f1a57 (patch)
treecbbfa1b26edab7d9b8447bf3b77a4896c67f9094 /storage/connect/libdoc.cpp
parentb63eb1d8b49bcaedde419590b07d56d7e96b3ac7 (diff)
downloadmariadb-git-9716acfcc3a7dfbd3ee55fe55c28937eac2f1a57.tar.gz
- 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
Diffstat (limited to 'storage/connect/libdoc.cpp')
-rw-r--r--storage/connect/libdoc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp
index c0c917f544d..e094f935c80 100644
--- a/storage/connect/libdoc.cpp
+++ b/storage/connect/libdoc.cpp
@@ -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++ = ' ';