Index: filter.module =================================================================== --- filter.module (revision 345) +++ filter.module (working copy) @@ -922,6 +922,8 @@ $chunk = preg_replace('!(]*>)\s*
!', "$1", $chunk); $chunk = preg_replace('!
(\s*)!', '$1', $chunk); $chunk = preg_replace('/&([^#])(?![A-Za-z0-9]{1,8};)/', '&$1', $chunk); + $chunk = preg_replace("|

(\[.+?\])

|", "$1", $chunk); // remove

around tokens, allows for W3 Compliant tokens + $chunk = preg_replace("|(\[.+?\])

|", "

$1", $chunk); // if content+token wrapped in

too, put

before token } $output .= $chunk; }