WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 13 months ago

#9820 new defect (bug)

Multiple newlines stripped from within MT import files

Reported by: IndigoJo Owned by:
Priority: normal Milestone: WordPress.org
Component: Import Version: 2.7.1
Severity: normal Keywords: needs-patch
Cc:

Description

When I imported entries from my old MT blog into a new Wordpress install, I expected my multiple newlines to be preserved. This is because MT uses them to form paragraphs; the Markdown or Text Control plugins can do the same in Wordpress, but either way, if you strip them out, you get a huge bundle of text which is difficult to read.

The problem appears to be in the wp-admin/import/mt.php file, which ignores blank lines regardless of context. If a newline were added in the event of a blank line when the context was body, comment, extended or excerpt, the newlines would be preserved. The attached patch fixes this.

Attachments (1)

patch.mt.php (856 bytes) - added by IndigoJo 4 years ago.
Patch to insert newlines when relevant

Download all attachments as: .zip

Change History (7)

IndigoJo4 years ago

Patch to insert newlines when relevant

comment:1 Denis-de-Bernardy4 years ago

  • Milestone changed from Unassigned to 2.8

comment:2 Denis-de-Bernardy4 years ago

  • Milestone changed from 2.8 to Future Release

punting pending patch

comment:3 Denis-de-Bernardy4 years ago

  • Keywords needs-patch added

comment:4 Denis-de-Bernardy4 years ago

  • Milestone changed from Future Release to 2.9

comment:5 janeforshort4 years ago

  • Milestone changed from 2.9 to Future Release

This ticket hasn't had any community activity. Need to see some people testing it etc. Punting because we're in beta.

comment:6 SergeyBiryukov13 months ago

  • Milestone changed from Future Release to WordPress.org
Note: See TracTickets for help on using tickets.