WP removes valid p-Tags within listings
-
Hi,
I know that the TinyMCE-Editor of WP strippes out p-tags visually and in certain cases efficiently, for example if webmaster don’t use it correctly.
However p-tags within listing items are valid due to W3C and removed efficiently!?
<li><p>........</p></li> ---> <li>......</li>
Is it a bug? Advanced Tiny MCE allows to change the “visibility-issue” of p and br, but this is not helpful in this case because within li paragraphs are removed really, efficiently.
My site has exactly two cases of listings:
-Unordered listings where all (big) items should have a p in order to get a free line between them.-Unordered listings where all items are very short, therefore there is no need for additional space by inserting p.
What’s the best way solving this?
-My theme allows changing bottom-margin for list items but by default for all listings.
–Advanced TinyMCE? Right now I have the default editor.
-Code for functions.php? A simple way preventing WP to remove any tags, i.e., all of them are retained? Big advantage: I will never have to think and research what tags and why WP could remove, if it may be a good thing or not… Very clean and straight.
-Extra CSS-class for one of my two listing cases, for example the ones which need space between items? Anyone can give me the code?
Thanks fur suggestions.
- The topic ‘WP removes valid p-Tags within listings’ is closed to new replies.