summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/db/xmlsource.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/tableviewer/db/xmlsource.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/db/xmlsource.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/apps/tableviewer/db/xmlsource.cpp b/noncore/apps/tableviewer/db/xmlsource.cpp
index 7418a85..94fec36 100644
--- a/noncore/apps/tableviewer/db/xmlsource.cpp
+++ b/noncore/apps/tableviewer/db/xmlsource.cpp
@@ -18,12 +18,14 @@
**
**********************************************************************/
#include "xmlsource.h"
#include <qdict.h>
#include <stdlib.h>
#include <qtextstream.h>
+#include "../xmlencodeattr.h"
+
DBXml::DBXml(DBStore *d)
{
dstore = d;
}
@@ -65,13 +67,13 @@ bool DBXml::saveSource(QIODevice *outDev)
while(it.current()) {
if (!it.current()->delFlag()) {
outstream << "<key name=\"KEYID" << it.currentKey() << "\" ";
outstream << "type=\""
<< TVVariant::typeToName(it.current()->type())
<< "\">";
- outstream << it.current()->name() << "</key>" << endl;
+ outstream << encodeAttr(it.current()->name()) << "</key>" << endl;
}
++it;
}
outstream << "</header>" << endl;
@@ -91,13 +93,13 @@ bool DBXml::saveSource(QIODevice *outDev)
// dates in files are different from displayed dates
QDate date = elem->getField(i).toDate();
outstream << date.day() << "/"
<< date.month() << "/"
<< date.year();
} else {
- outstream << elem->toQString(i);
+ outstream << encodeAttr(elem->toQString(i));
}
outstream << "</KEYID" << i << ">" << endl;
}
++it;
}
outstream << "</record>" << endl;