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

Brion Vibber brion at wikimedia.org
Wed May 30 18:15:52 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ken McDonald 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.

That's not legal in the current MediaWiki parser.

At the moment though it will "work" the way you want it if you enable
the use of HTML Tidy as an HTML nesting sanitizer (install HTML Tidy and
set $wgUseTidy) instead of the built-in tag balancing code.

This behavior will eventually be normalized one way or the other for
both modes.

- -- brion vibber (brion @ wikimedia.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXb9YwRnhpk1wk44RAkNCAKCe3ZaBAyFb+92bmmmbIPHV0kwf3QCbBqCh
U1ueEKO/vdj9Ubsl1G6/n/o=
=Qpq1
-----END PGP SIGNATURE-----



More information about the MediaWiki-l mailing list