Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a2cf90d9
Commit
a2cf90d9
authored
Feb 15, 2013
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress multiple blanks and control characters from the
node text retrieved by libxml2. Modified: libdoc.cpp
parent
b2f11bf0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
storage/connect/libdoc.cpp
storage/connect/libdoc.cpp
+21
-1
No files found.
storage/connect/libdoc.cpp
View file @
a2cf90d9
...
@@ -461,8 +461,28 @@ char *XML2NODE::GetText(char *buf, int len)
...
@@ -461,8 +461,28 @@ char *XML2NODE::GetText(char *buf, int len)
xmlFree
(
Content
);
xmlFree
(
Content
);
if
((
Content
=
xmlNodeGetContent
(
Nodep
)))
{
if
((
Content
=
xmlNodeGetContent
(
Nodep
)))
{
char
*
p1
,
*
p2
;
bool
b
=
false
;
int
rc
=
((
PXDOC2
)
Doc
)
->
Decode
(
Content
,
buf
,
len
);
int
rc
=
((
PXDOC2
)
Doc
)
->
Decode
(
Content
,
buf
,
len
);
// Eliminate extra characters
for
(
p1
=
p2
=
buf
;
*
p1
;
p1
++
)
if
(
strchr
(
"
\t\r\n
"
,
*
p1
))
{
if
(
b
)
{
*
p2
++
=
' '
;
b
=
false
;
}
// endif b
}
else
{
*
p2
++
=
*
p1
;
b
=
true
;
}
// endif p1
if
(
*
(
p2
-
1
)
==
' '
)
*
(
p2
-
1
)
=
0
;
else
*
p2
=
0
;
if
(
trace
)
if
(
trace
)
htrc
(
"GetText buf='%s' len=%d rc=%d
\n
"
,
buf
,
len
,
rc
);
htrc
(
"GetText buf='%s' len=%d rc=%d
\n
"
,
buf
,
len
,
rc
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment