Page MenuHomePhabricator

Double newlines in blockquotes should be turned into paragraphs
Closed, ResolvedPublic

Description

Wikitext:

<blockquote>
Foo

Bar
</blockquote>

Parsoid renders this as:

<blockquote data-parsoid='{"stx":"html","dsr":[0,35,12,13]}'>
<p data-parsoid='{"dsr":[13,16,0,0]}'>Foo</p>

<p data-parsoid='{"dsr":[18,21,0,0]}'>Bar</p>
</blockquote>

PHP renders this as:

<blockquote>
Foo

Bar
</blockquote>

which displays as "Foo Bar"


Version: unspecified
Severity: normal
See Also:
T8200
T3857
T17491

Details

Reference
bz51086

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:07 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz51086.

Ugh ... Tidy messes with us again.

<blockquote>

foo

</blockquote>

In the test case above and the the one posted by Roan, parserTests specifies no outer p-wrapping, but Tidy adds an outermost p-wrapper inside blockquote (check in sandbox). Only one p-tag is added around plain text insde blockquote independent of # of newlines. Adding it will fail parser tests, and not adding it will not match Tidy's output.

So, should we or should we not add that single p-wrapper around text as a child of <blockquote>?

The content semantics are really those with tidy, so whenever those make some sense we should follow them rather than broken PHP-only parser behavior. We can always mark the test Parsoid-only.

Discussing this in IRC, we resolved that this was Not A Bug in Parsoid... but in fact the PHP parser should be changed to be consistent with parsoid (ie, double-newlines inside blockquotes should indicate division into paragraphs).

This seems like it's a symptom of bug 6200.

  • This bug has been marked as a duplicate of bug 6200 ***