 	cp_node.status,
 	FROM_UNIXTIME(cp_node.created) AS created,
 	FROM_UNIXTIME(cp_node.changed) AS changed,
-	REPLACE(cp_node_revisions.body, '\n', '') AS body,
-	REPLACE(cp_node_revisions.teaser, '\n', '') AS teaser,
+	REPLACE(IFNULL(cp_node_revisions.body, ''), '\r\n', '\n') AS body,
+	REPLACE(IFNULL(cp_node_revisions.teaser, ''), '\r\n', '\n') AS teaser,
 	cp_node_revisions.vid,
 	-- cp_url_alias.dst,
 	cp_column_list.coid AS blog_coid,

FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\n';

SELECT
	'cid',

	cp_comments.cid,
	cp_comments.nid,
	cp_comments.uid,
	REPLACE(IFNULL(cp_comments.subject, ''), '\r\n', '\n') AS subject,
	REPLACE(IFNULL(cp_comments.comment, ''), '\r\n', '\n') AS comment,
	cp_comments.hostname,
	FROM_UNIXTIME(cp_comments.timestamp) AS 'timestamp',
	cp_comments.name,
	cp_comments.mail,
	cp_comments.homepage
