summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-15 20:53:27 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-18 19:11:44 (GMT)
commit8e1bdd6727a2e0d4e5b0894a83905c275348b037 (patch)
treefc943fabc48f3bb780f82c096eecdefd39fd69b4 /Swiften/JID/JID.h
parenta4e59529239902ac352e791767db63a31e2e0634 (diff)
downloadswift-8e1bdd6727a2e0d4e5b0894a83905c275348b037.zip
swift-8e1bdd6727a2e0d4e5b0894a83905c275348b037.tar.bz2
JID escaping algorithm refactoring.
Made algorithm more efficient. Fixed some incorrect escaping. Added more tests from the XEP.
Diffstat (limited to 'Swiften/JID/JID.h')
-rw-r--r--Swiften/JID/JID.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/JID/JID.h b/Swiften/JID/JID.h
index f2a95be..98b42da 100644
--- a/Swiften/JID/JID.h
+++ b/Swiften/JID/JID.h
@@ -38,8 +38,16 @@ namespace Swift {
return !hasResource_;
}
+ /**
+ * Returns the given node, escaped according to XEP-0106.
+ * The resulting node is a valid node for a JID, whereas the input value can contain characters
+ * that are not allowed.
+ */
static std::string getEscapedNode(const std::string& node);
+ /**
+ * Returns the node of the current JID, unescaped according to XEP-0106.
+ */
std::string getUnescapedNode() const;
JID toBare() const {