Last modified: 2012-04-12 13:54:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30252, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28252 - MediaWiki doesn't parse HTML table attributes within a template inclusion
MediaWiki doesn't parse HTML table attributes within a template inclusion
Status: RESOLVED DUPLICATE of bug 14235
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.16.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-26 14:44 UTC by René Schwarz
Modified: 2012-04-12 13:54 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description René Schwarz 2011-03-26 14:44:18 UTC
I have the following template, named "Highlight":

===========
<div style="border: 1px solid #0080FF;">
{{{1}}}
</div>
===========

If I try to include the template with an table in that way

===========
{{Highlight|
<table>
<tr>
<td>some cell</td>
<td>some cell</td>
<td>some cell</td>
</tr><tr>
<td>some cell</td>
<td>some cell</td>
<td>some cell</td>
</tr>
</table>
}}
===========

everything is fine. But if I add a additional attribute to the table, tr or td tag, the page is not rendered properly, only showing "{{{1}}}" as content of the div element defined in Template:Highlight.

===========
{{Highlight|
<table class="wikitable">
<tr>
<td>some cell</td>
<td>some cell</td>
<td>some cell</td>
</tr><tr>
<td>some cell</td>
<td>some cell</td>
<td>some cell</td>
</tr>
</table>
}}
===========

This shouldn't be the expected behaviour. BTW: Why is it impossible to match nested template inclusions against a regular pattern, so that the pipe hiding ("|" to e.g. {{!}}) is not neccessary? I would wish that something like that is possible in a near future version of MediaWiki:

===========
{{someTemplate|
{|
|+ some table
|-
| content
| content
|-
|}
}}
===========
Comment 1 P.Copp 2011-03-26 15:38:02 UTC
If the parameter contains a "=", you have to use it like this:

{{Highlight|1=
...
}}

*** This bug has been marked as a duplicate of bug 14235 ***
Comment 2 Thana 2011-03-27 21:01:21 UTC
> This shouldn't be the expected behaviour. BTW: Why is it impossible to match
> nested template inclusions against a regular pattern, so that the pipe hiding
> ("|" to e.g. {{!}}) is not neccessary? I would wish that something like that
> is possible in a near future version of MediaWiki:

depending on rené's actual needs, passing some table-generating template as a
parameter might be easier and more scrutable than using {{!}}.

> {{someTemplate|
>   {{make_some_table
>   | caption = some table
>   | c1 = content
>   | c2 = content
>   }}
> }}

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links