[Mediawiki-l] Preventing extension output from being wrapped with "<p>" and "</p>"?

Jim Wilson wilson.jim.r at gmail.com
Thu May 31 04:47:29 UTC 2007


The reason the output is being wrapped in <p> tags is that the output of
your extension is detected by the Parser as being something other than a
block level element[1].  If your extension would output a <div> or <pre> tag
instead of <span>, you might see a difference.

[1] http://htmlhelp.com/reference/html40/block.html

-- Jim R. Wilson (jimbojw)

On 5/30/07, Ken McDonald <ken at pixologic.com> wrote:
>
> Sigh, having written a couple of extensions to (separately) insert HTML
> opening and closing tags into pages, I find that the output of those
> extension tags is being wrapped in <p>...</p>. This occurs even if I
> don't put line breaks before/after the tags (and omitting line breaks
> messes other things up anyway).
>
> For example, one of my tags outputs: <span style="display:block;
> float:left; width:33%">
>
> and in the HTML I get:
>
> <p><span style="display:block; float:left; width:33%">
> </p>
>
> which is not only not what I want, but also incorrect HTML!
>
>
> Thanks,
> 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