Page MenuHomePhabricator

Superfluous \n in PageForms changes how checkboxes render inside a table
Closed, ResolvedPublic

Description

Provide the following form in [[Form:Job query]]:

{|
|{{{field|job type|input type=checkboxes|values from property=Job types}}}
|}

Make sure the property "Job types" has at least 3 different pages associated with it. (2 will show the problem, but with 3 it becomes more obvious.)

In a separate page (e.g. [[Form problem example]], embed the query page using the following:

{{Special:RunQuery/Job query}}

Depending on the job types property, something like the following will be displayed:

  • Enhancement
  • Minor [] Trivial

(The "[]" will be a checkbox, but my phabricator phoo only goes so far.)

The MW parser sees the extra \n generated by PF_CheckboxesInput.php and adds a <p> that surrounds every checkbox after the first checkbox.

Remove the table layout and the checkboxes will all be displayed in a single line, even with the extra \n.

Patch incoming. It addresses this issue, but the issue really looks like a quirk of the MW parser.