[pmwiki-devel] Extra <p> when adding fieldset to form markup
marc
gmane at auxbuss.com
Wed Nov 22 08:44:47 CST 2006
Hans said...
> Wednesday, November 22, 2006, 9:47:57 AM, marc wrote:
>
> > I'm tying to add fieldset markup, but when the HTML is generated the
> > tags are surrounded by unwanted <p> tags, which invalidates the HTML.
>
> <fieldset> is a blocklevel element, so perhaps try this:
>
> function AuxCells($name,$attr) {
> $name = strtolower($name);
> $attr = PQA($attr);
> switch ($name) {
> case 'fieldsetend';
> $out = '<:block></fieldset>';
> break;
> case 'fieldset';
> $out = "<:block><fieldset $attr>";
> break;
> }
> return $out;
> }
>
> Markup('auxcells', 'block',
> '/^\\(:(fieldset|fieldsetend|legend|legendend)(\\s.*?)?:\\)/ie',
> "AuxCells('$1',PSS('$2'))");
Hi Hans,
Brilliant! Thanks a lot.
I had tried
Markup('auxcells', 'block',
but didn't know about the extra PmWiki tag that's required.
Is this written up somewhere? A search on pmwiki.org didn't unearth
anything.
--
Best,
Marc
More information about the pmwiki-devel
mailing list