[Mediawiki-l] Including unmatched HTML tags in templates? How to?

Jim Wilson wilson.jim.r at gmail.com
Tue May 29 21:09:47 UTC 2007


Tables don't suffer from this limitation, so having a Template:start with:

{|
|

and a Template:end with:

|}

should work just fine.

-- Jim R. Wilson (jimbojw)

On 5/29/07, Ken McDonald <ken at pixologic.com> wrote:
>
> I would like to define two templates, one being a "start" template which
> contains
>    <div style="bunch of stuff">
>
> and the other containing just
>    </div>
>
> However, the "</div>" is being escaped by the MW engine, so appears
> verbatim in the page, rather than functioning as an HTML end tag.
>
> Is there a way around this? I'm guessing the problem is that the MW
> engine doesn't see matching start and end divs when it parses the
> markup, and so decides that </div> should be interpreted literally
> rather than as HTML.
>
> Defining just a single template that wraps the tags around the content
> is not an option; the stuff within the tags can be quite complex, and
> our experience is that the standard markup is just too fragile to be
> able to do that sort of thing.
>
> We could of course just put literal divs into the pages, but that gets
> messy, and also means we can't change the style in the future.
>
>
>
> Many thanks for your suggestions,
> Ken
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>


More information about the MediaWiki-l mailing list