[pmwiki-devel] Extra <p> when adding fieldset to form markup

marc gmane at auxbuss.com
Wed Nov 22 03:47:57 CST 2006


Hi,

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.

  <form id='login' method='post'>
  <p><fieldset class='fieldset' >
  </p>
  <table ><tr>

How do I stop the <p> tags being generated?

Here's what I'm using:

function AuxCells($name,$attr) {
	$name = strtolower($name);
	$attr = PQA($attr);
	switch ($name) {
		case 'fieldsetend';
		$out = '</fieldset>';
		break;
		case 'fieldset';
		$out = "<fieldset $attr>";
		break;
	}
	return $out;
}

Markup('auxcells', '<inline',
  '/^\\(:(fieldset|fieldsetend|legend|legendend)(\\s.*?)?:\\)/ie',
  "AuxCells('$1',PSS('$2'))");

-- 
Best,
Marc




More information about the pmwiki-devel mailing list