The WordPress word editor spits out empty <p> tags like this: <p> </p>.
I would like to target all <p> with in them and remove them. I believe I have to use the contains and remove functions but I am not sure if this code would remove the <p> tags with only in them or remove all <p> tags with in them anywhere.
jQuery('p:contains(" ")').remove();
How would I make this work?
you can use .filter and look if the innerHTML is equal to :