[wp-trac] [WordPress Trac] #16147: MT Importer truncates double vertical spaces, munging paragraphs together
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 7 22:25:47 UTC 2011
#16147: MT Importer truncates double vertical spaces, munging paragraphs together
--------------------------+-----------------------------
Reporter: novasource | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Import | Version: 3.0.4
Severity: major | Keywords:
--------------------------+-----------------------------
Movable Type 3.x-era exports don't use '''<p>''' tags. Like TinyMCE (and
WordPress), a '''<p>''' in final rendered code is represented by two
'''\n'''s in a row.
The importer strips out double '''\n'''s and replaces with a single
'''\n'''. This causes paragraphs to lose their distinction upon import.
It does this because the '''$line''' variable was created by '''$line =
$this->fgets($handle)''' (line 339). Then '''$line = trim($line)''' (line
340) strips out several characters, including '''\n'''.
Lines 455 and 456 add back the '''\n''' ''except'' on blank lines:
{{{
if( !empty($line) )
$line .= "\n";
}}}
So if a '''$line''' was nothing but a '''\n''', it's stripped by the
'''trim''' function and becomes a 0 character line. Then the '''if(
!empty($line) )''' declines to add back a '''\n'''.
Somehow this needs to be altered so that successive '''\n'''s aren't
stripped. Otherwise paragraphs get vertically munged together.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16147>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list