Changes between Initial Version and Version 1 of Ticket #22279
- Timestamp:
- 02/22/2014 09:40:42 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22279
-
Property
Summary
changed from
Wordpress Export/Import deletes carriage returns
toWordPress Export/Import deletes carriage returns
-
Property
Summary
changed from
-
Ticket #22279 – Description
initial v1 1 Word press export does not translate or escape bare CR characters in a CR/LF pair. They show up unfiltered in the WXR export file. I see this both in post_content and in strings that were serialized into a post_meta field. The CR characters are in the WXR file, unfiltered.1 WordPress export does not translate or escape bare CR characters in a CR/LF pair. They show up unfiltered in the WXR export file. I see this both in post_content and in strings that were serialized into a post_meta field. The CR characters are in the WXR file, unfiltered. 2 2 3 Then, Word press import loses these CR characters. They are simply erased. It may be because SimpleXMLParser can't or won't open the XML file in binary mode, so line ending translation can & does happen. That's just a theory, but if it's true then this behavior might *not* happen on all platforms or with all PHP versions. (I'm seeing this on OS X 10.6.8, PHP 5.4.4.)3 Then, WordPress import loses these CR characters. They are simply erased. It may be because SimpleXMLParser can't or won't open the XML file in binary mode, so line ending translation can & does happen. That's just a theory, but if it's true then this behavior might *not* happen on all platforms or with all PHP versions. (I'm seeing this on OS X 10.6.8, PHP 5.4.4.) 4 4 5 5 In the worse case -- mine -- the munged string is a small component of a complex datastructure that is serialized in a postmeta record. In this case, the entire meta_value field is deleted on import, because the data won't unserialize, because its length has changed. … … 11 11 * store a carriage return in a post. 12 12 * export it to a WXR file. 13 * examine the WXR file for the raw carriage return ( ^M).13 * examine the WXR file for the raw carriage return (`^M`). 14 14 * import that file. 15 15 * search for the carriage return.