aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-03-14 19:40:05 +0000
committerMike Buland <eichlan@xagasoft.com>2007-03-14 19:40:05 +0000
commit33523ddc865d55db1c7e45eca504f97a97aa5ce0 (patch)
treef03229a1372bd4958ad456009abe405c4c190db9
parent82d16c9fb29f35b52868eda8725a86379a98b6fb (diff)
downloadlibbu++-33523ddc865d55db1c7e45eca504f97a97aa5ce0.tar.gz
libbu++-33523ddc865d55db1c7e45eca504f97a97aa5ce0.tar.bz2
libbu++-33523ddc865d55db1c7e45eca504f97a97aa5ce0.tar.xz
libbu++-33523ddc865d55db1c7e45eca504f97a97aa5ce0.zip
Now fixed the xml escaping...sigh.
Diffstat (limited to '')
-rw-r--r--src/tests/xmlwritetest.cpp4
-rw-r--r--src/xmlwriter.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/xmlwritetest.cpp b/src/tests/xmlwritetest.cpp
index 54c7a80..a22d19d 100644
--- a/src/tests/xmlwritetest.cpp
+++ b/src/tests/xmlwritetest.cpp
@@ -7,9 +7,9 @@ void fillItIn( XmlWriter &w )
7 w.addNode("thinglist"); 7 w.addNode("thinglist");
8 8
9 w.addNode("thing"); 9 w.addNode("thing");
10 w.addProperty("type", "Weapon"); 10 w.addProperty("type", " ±î´<M-F6><M-F6>³¸®°êòì¯");
11 11
12 w.addNode("id", "Klophin Staff", true ); 12 w.addNode("id", "Klophin²³±¹¸·µ´äêíëã Staff", true );
13 w.addNode("name", "Klophin Staff", true ); 13 w.addNode("name", "Klophin Staff", true );
14 w.addNode("durability", "0.01", true ); 14 w.addNode("durability", "0.01", true );
15 w.addNode("size", "0.1", true ); 15 w.addNode("size", "0.1", true );
diff --git a/src/xmlwriter.cpp b/src/xmlwriter.cpp
index 0c9c7db..56880b6 100644
--- a/src/xmlwriter.cpp
+++ b/src/xmlwriter.cpp
@@ -67,7 +67,7 @@ std::string XmlWriter::escape( std::string sIn )
67 { 67 {
68 sOut += "&#"; 68 sOut += "&#";
69 char buf[4]; 69 char buf[4];
70 sprintf( buf, "%u", (unsigned int)*i ); 70 sprintf( buf, "%u", (unsigned char)*i );
71 sOut += buf; 71 sOut += buf;
72 sOut += ';'; 72 sOut += ';';
73 } 73 }