TinyMCE creates empty paragraph tags when you hit enter twice. like:
<p> </p>
Which is
<p>SPACE</p>
In FireBug it calls this space a " " but the html code/DB backend just shows a space. When I do "str_replace('<p> </p>'....." it doesnt find the block… basically I think the “space” is somehow not a standard space and some sort of borked encoded space. Is there a regex I can run that will remove this tag? I’ve been stuck on this for hours… or even something like
regex('<p>LESS THAN THREE CHARS</p>'...)
would probably work
Thank you
I would use:
where
\ssignifies a white space of any kind (tab, space, etc.) and*indicates 0 or more occurence of this (space). So<p></p>,<p> </p>,<p>{multiple spaces here}</p>will all be replaced by an empty string. The additionaliflag is for case-insensitivity, just in case<p>‘s might instead be<P>‘s.