I’m making a site for a client (just a new layout, site already exists, and it’s done in Joomla 1.7). I’ve got a problem with articles, done via WYSIWYG editor by client. Why? Well, code it’s pretty messed up. There are many empty tags, like:
<p></p>
<p> </p>
or even:
<p><span style="color: #008000;"><span style="font-size: medium;"><strong> </strong></span></span></p>
Can I remove it somehow with JavaScript or CSS? Or maybe I shouldn’t care, since I can’t control the way client uses editor?
EDIT: So, solution by kitgui.com did the trick – check out this plugin – http://code.google.com/p/jquery-clean/ – works like a charm.
David made a good suggestion but I didn’t see if you were doing PHP or not. If you want to try JavaScript post processing you could try applying:
http://code.google.com/p/jquery-clean/
at the end before saving..