Hey guys,
We built a custom CMS at my work, the site currently using it is working great.
One final issue that we’re working to resolve is that when someone pastes in content for one of their pages, the WYSIWYG adds an empty
tag at the end of the content. (I believe this is due to empty white space being pasted in from Microsoft Word or a similar program).What this causes is the side navigation will get dumped under the main content. (So the right column gets put under the left column).
It’s strange, but once the empty
is removed, the problem is fixed and the columns return to their proper place.Is there a function available to just strip out this empty tag if it exists without harming any of the other tags?
It ONLY gets added as the last thing, so maybe I can strip out the final 7 characters somehow? (
However a problem I see with this is it only happens sometimes, thus I can’t go stripping out the last 7 characters if the problem doesn’t exist, or their content will get stripped.
We store the content into the database with a simple:
$content = $_POST[‘content’];
I’ve had similar problems where I had to replace all white space in a string with dashes, but having trouble applying that function to this…
Any help would be great! Thanks.