summaryrefslogtreecommitdiff
path: root/src/plugins/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/xml')
-rw-r--r--src/plugins/xml/XmlOutput.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/xml/XmlOutput.cpp b/src/plugins/xml/XmlOutput.cpp
index 00aae04..68edc0e 100644
--- a/src/plugins/xml/XmlOutput.cpp
+++ b/src/plugins/xml/XmlOutput.cpp
@@ -107,10 +107,18 @@ Rooted<Text> XmlTransformer::transformPrimitive(Handle<Element> parent,
{
Manager &mgr = parent->getManager();
// transform the primitive content.
+ Variant v = p->getContent();
std::string textcontent =
VariantWriter::writeJsonToString(p->getContent(), pretty);
+ if (v.isString() && ((textcontent[0] == '\"' &&
+ textcontent[textcontent.size() - 1] == '\"') ||
+ (textcontent[0] == '\'' &&
+ textcontent[textcontent.size() - 1] == '\''))) {
+ // cut the start and end quote
+ textcontent = textcontent.substr(1, textcontent.size() - 2);
+ }
Rooted<Text> text{new Text(mgr, parent, textcontent)};
return text;
}
}
-} \ No newline at end of file
+}