Admin Forum:How to prevent the insertion of p- and span-tags?

I like wikicode. I really do. It's great. But.

For the past hour or two I've been trying to throw together a template that allows wikicode but prevents the wikicode parser from inserting all kinds of useless and unwanted p- and span-tags. The "creative" interpretation of the whitespace in my wikicode is starting to get on my nerves.

(What I'm trying to create is a div with two columns of links in it btw)

Can that be done? Can you have wiki links (and wiki headers etc.) but still complete control over the whitespace? -- Pecoes 20:20, March 1, 2012 (UTC)


 * I did find a hack. I neutralized the unwanted markup with:


 * and handled the whitespace by throwing around with &lt;br /&gt;s like nobody's business.


 * That seems to have worked. Still: If someone knows how to take control of the whitespace without resorting to hacks, please, do tell me! -- Pecoes 21:29, March 1, 2012 (UTC)


 * I'm not sure what you mean by creative interpretation of whitespace. You'd have to provide an example of what specific bad effects you are refering to. If your problem is with the rich text editor adding extraneous html tags (such as the strings of  removed in this edit), you could use the AbuseFilter extension to prohibit edits that contain those kinds of errors.
 * If you want a two-column list of links for a "See also" section, you could use something like the wikipedia:Template:Column-count, which uses the CSS3 "column-count" property. That way you wouldn't need separate parameters for each side, and your left and right list of links would automatically have balanced lengths. The only downside is that it doesn't work in all browsers. --Gardimuer { ʈalk } 18:38, March 3, 2012 (UTC)

Here's an example:

Now check out the source code of the result:

one two three four five six

Pecoes 18:52, March 3, 2012 (UTC)