summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-26 15:11:55 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-26 15:12:42 (GMT)
commit39e58e4593f54a65f810e73728fe2490958fcba2 (patch)
tree8f740529fb5b3a972387cb65c03bfdff67253081 /Swiften
parent808a8047237d663e770cb8aec45c7978862b09ac (diff)
downloadswift-39e58e4593f54a65f810e73728fe2490958fcba2.zip
swift-39e58e4593f54a65f810e73728fe2490958fcba2.tar.bz2
Escape '>' to avoid trouble.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Serializer/XML/XMLTextNode.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/Swiften/Serializer/XML/XMLTextNode.h b/Swiften/Serializer/XML/XMLTextNode.h
index a142325..87dda53 100644
--- a/Swiften/Serializer/XML/XMLTextNode.h
+++ b/Swiften/Serializer/XML/XMLTextNode.h
@@ -1,5 +1,4 @@
-#ifndef SWIFTEN_XMLTextNode_H
-#define SWIFTEN_XMLTextNode_H
+#pragma once
#include "Swiften/Serializer/XML/XMLNode.h"
@@ -9,6 +8,7 @@ namespace Swift {
XMLTextNode(const String& text) : text_(text) {
text_.replaceAll('&', "&amp;"); // Should come first
text_.replaceAll('<', "&lt;");
+ text_.replaceAll('>', "&gt;");
}
String serialize() {
@@ -19,5 +19,3 @@ namespace Swift {
String text_;
};
}
-
-#endif