[resolved] Remove unwanted BR linebreak after tag (3 posts)

I have the exact same issue, something is adding breaks after </label> tags. The affected code is part of Store Locator Plus plugin, I found the relevant part in the plugin that generates this HTML code and there's definitely no in there.

I tried the remove_bad_br_tags function hook mentioned in the thread; I verified that it works for replacing other kinds of text in the document but it doesn't see the </label> tag. Basically$content = str_ireplace("</label>", "foobar", $content);
doesn't do anything.

Returned values from 'the_content' filter are almost immediately echoed out to the browser. The only way $content could end up differently than what your filter function returns is if a different filter hooked to 'the_content' is also altering content. You might try adding a high numbered 3rd parameter to your add_filter() call in an attempt to get your filter to be applied last.

You may gain insight to what other filters are involved by doing a var_dump() on the global $wp_filter array which contains all filter function references.

My PHP skills are rudimentary but I was able to execute a var_dump. There are 9 other filters hooking to "the_content". Looks like the culprit is "theme_formatter" from my Striking theme, which has priority=99.