Page MenuHomePhabricator

Parsoid rendering of pages using Template:(! significantly differs from legacy parser
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

The table attributes are shown as plain text in a <p> tag preceding the table

What should have happened instead?:

The table attributes should be part of the table, like when using the legacy parser

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

There is a never-ending list of these "hacky ways to work around wikitext escaping templates" (see "similar templates" under https://www.mediawiki.org/wiki/Template:(! ( and we should figure out a consistent way to handle all of them. We pulled {{!}} into core so that it was present on every wiki... should we do the same for all of these weird variants as well?

I'm curious why they didn't just use the HTML entity expansion in the template definition. That seems like a more reliable way to get the effect they want.

I'm curious why they didn't just use the HTML entity expansion in the template definition.

That won’t produce a wikitable, but a literal {| instead, since HTML entities are treated as being <nowiki>ed.

I am guessing this is the right ticket to report an issue. In fi-wiki there is now broken rendering in the case where another template is within infobox (for basketball player outfit), example: [[:fi:Suomen koripallomaajoukkue]]. Also template documentation pages are not using table markup correctly, example: [[fi:Malline:Kirjaviite/ohje]].

Edit: direct links:

This fiwiki issue is more T417705: Difference in table row closing when switching from html to wikitext syntax cells. This template uses html tr/td tags, but the template is embedded in this template which uses wikitext table syntax and that transition is handled different in the legacy parser and Parsoid. The legacy parser closes a table row whereas Parsoid correctly doesn't. We'll recommend possible template fixes for this case once we look into it a bit more.

This was an easy fix. I edited your template. I also recommend that you remove all the other escaping in that table and use standard table wikitext because the table is not embedded in a context that requires them to be escaped. It makes it also easier to understand.