ObjFW  Check-in [1ac4a1f056]

Overview
Comment:OFXMLCDATA: Properly escape ]]>
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1ac4a1f05645998743aec1298a1e49034cfe318869d0e7daad1f7af93f01f748
User & Date: js on 2015-01-04 20:54:16
Other Links: manifest | tags
Context
2015-01-17
18:39
Fix compilation on Win32 check-in: 8b0caeabde user: js tags: trunk
2015-01-04
20:54
OFXMLCDATA: Properly escape ]]> check-in: 1ac4a1f056 user: js tags: trunk
2015-01-03
20:57
Update copyright check-in: cfd374b906 user: js tags: trunk
Changes

Modified src/OFXMLCDATA.m from [07b76c5de1] to [2dd12fd542].

98
99
100
101
102
103
104
105
106









107
108
109
110
111
112
113
98
99
100
101
102
103
104


105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120







-
-
+
+
+
+
+
+
+
+
+







	OFString *old = _CDATA;
	_CDATA = [stringValue copy];
	[old release];
}

- (OFString*)XMLString
{
	/* FIXME: What to do about ]]>? */
	return [OFString stringWithFormat: @"<![CDATA[%@]]>", _CDATA];
	void *pool = objc_autoreleasePoolPush();
	OFString *tmp = [_CDATA
	    stringByReplacingOccurrencesOfString: @"]]>"
				      withString: @"]]>]]&gt;<![CDATA["];
	OFString *ret = [OFString stringWithFormat: @"<![CDATA[%@]]>", tmp];

	[ret retain];
	objc_autoreleasePoolPop(pool);
	return [ret autorelease];
}

- (OFString*)XMLStringWithIndentation: (unsigned int)indentation
{
	return [self XMLString];
}