Page MenuHomePhabricator

Parsoid doesn't serialize <p>s in <blockquote>s correctly
Closed, ResolvedPublic

Description

Input HTML:
<blockquote>Foo<p>Bar</p></blockquote>

Output wikitext from serializer:
<blockquote>Foo
Bar</blockquote>

This is incorrect because:

  • You need 2 newlines to create a new paragraph, not one
  • Two newlines don't create a paragraph inside a blockquote per bug 51086

Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=51262

Details

Reference
bz51087

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:07 AM
bzimport set Reference to bz51087.

Two newlines do create a paragraph inside a blockquote now (bug 6200 was fixed in the PHP parser). But parsoid's output is still incorrect (only has a single newline).

This is actually unrelated to blockquote and is a more generic problem of children of block-nodes. Patch coming in a bit.

This looks fixed.

echo "<blockquote>Foo<p>Bar</p></blockquote>" | node parse --html2wt
<blockquote>Foo
Bar
</blockquote>