removing empty p tags from CKeditor entries
When using CKeditor any line breaks br as in hitting enter will cause an extra and emtpy p tag. makes sense for the markup to give a formatted look.
I want them removed
CKeditor will inject a in the p tag if empty which means it isn't really empty so doing a quick jQuery won't work,
a string replace with reg expression does the trick
//this regular expression will remove empty P's with in it.
echo preg_replace($pattern, ' ', $variable or target);
this has a list of all the buttons you can remove with