aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMNSString+XML.h
diff options
context:
space:
mode:
Diffstat (limited to 'Foundation/GTMNSString+XML.h')
-rw-r--r--Foundation/GTMNSString+XML.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Foundation/GTMNSString+XML.h b/Foundation/GTMNSString+XML.h
index ed2d161..6ef54d7 100644
--- a/Foundation/GTMNSString+XML.h
+++ b/Foundation/GTMNSString+XML.h
@@ -31,7 +31,19 @@
// Returns:
// Autoreleased NSString
//
-- (NSString *)gtm_stringByEscapingForXML;
+- (NSString *)gtm_stringBySanitizingAndEscapingForXML;
+
+/// Get a string where characters that invalid characters per the XML spec have been removed
+//
+/// This call removes all invalid characters as defined by Section 2.2 of the
+/// xml spec. If you are writing XML yourself, you probably was to use the
+/// above api (gtm_stringBySanitizingAndEscapingForXML) so any entities also
+/// get escaped.
+//
+// Returns:
+// Autoreleased NSString
+//
+- (NSString *)gtm_stringBySanitizingToXMLSpec;
// There is no stringByUnescapingFromXML because the XML parser will do this.
// The above api is here just incase you need to create XML yourself.