Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using a vanilla up-to-date WordPress install. I've noticed that the visual editor, even in text mode, does not show <p> or <br> tags, and if you insert them it strips them out and replaces them with actual linebreaks, but the rendering still seems to work out okay. What I assume is going on is that the tags are there, but the text mode editor doesn't show them. Presumably that's why it's called "text mode", not "HTML mode".

However, inside blockquotes, things behave a little differently (in both the visual mode and text mode). Here's my content (copied and pasted from the text-mode):

<blockquote>C.S. Lewis mistakenly wrote that Susan had turned her back on Narnia, but what it really seems is that Lewis had turned his back on Susan.
<em>Fred Clark (Slacktivist), "<a href="http://www.patheos.com/blogs/slacktivist/2012/08/13/redeeming-susan-pevensie/">Redeeming Susan Pevensie</a>”</em>

One queen said ‘I am not a toy’, and she never returned.
<em>Senan Mcuire, "<a href="http://seananmcguire.com/songbook.php?id=238">Wicked Girls Saving Themselves</a>”</em>

A god who would punish me for liking nylons and parties by making me walk through that school dining room, with the flies, to identify Ed, well . . . he's enjoying himself a bit too much, isn't he? Like a cat, getting the last ounce of enjoyment out of a mouse.
<em>Neil Gaiman, "The Problem of Susan"</em>
<small><em>I can't find this one online legally. If you can (and I know some of Neil Gaiman's stuff is legally available online, so it's possible), please let me know in the comments.</em></small>

Susan is committing Lewis's cardinal sin: getting confused about what is real and what not.
<em>Andrew Rilstone, "<a href="http://www.andrewrilstone.com/2005/11/lipstick-on-my-scholar.html">Lipstick on my Scholar</a>”</em>

[<em>The Last Battle</em> is] definitely the weakest of all the books from a story perspective, because Lewis seems to have abandoned entirely such minor issues as characterization, world-building, plot, and the rest, all to hammer home a series of doctrinal points.
...
[Lewis is] eager to punish his characters and interested in how to do it.
<em>hapax and Kit Whitfield, "<a href="http://slacktivist.typepad.com/slacktivist/2012/07/the-question-of-susan.html">The Question of Susan</a>”</em>

Perhaps a very great problem with Susan is that the man who wrote her and other men who write about her consider her a vapid, egotistical, un-gentle person and assert that she is so without ever feeling the need to justify this characterization on the page, with in-character actions.
...
Denying Narnia can be a method of self-defense against being continually walled off from the outside world of which one may want desperately to be a part.
Narnia, as a place, is deeply hostile to the idea of consent.
<em>Ana Mardoll, "<a href="http://www.anamardoll.com/2012/05/narnia-susan-problems-of.html">Narnia: Susan, Problems of</a>”</em>
<small><em>(See also <a title="Narnia: The Narnia Deconstruction Index Post " href="http://www.anamardoll.com/2011/02/narnia-narnia-deconstruction-index-post.html">Ana Mardoll's full Narnia deconstruction index</a>.)</em></small>

He shows beautifully. His telling—when it works it works, but in some cases, you get this weird tug-of-war where Lewis-the-writer shows you a thing and Lewis-the-narrator tells you how to feel about it, and <em>Lewis-the-narrator is flat-out wrong.</em>
<em>Ursula Vernon, "<a href="http://www.redwombatstudio.com/blog/?p=5237">Narnian Apocalyptica</a>”</em>

This time an entire country doesn’t have to suffer for years upon years just to act as a backdrop to some British children’s magic adventure time.
<em>yubishines (repent, harlequin), <a href="http://yubishines.tumblr.com/post/31568643523">Narnia Deconstruction discussion</a></em>

You cannot keep the death-vigil for a god and go unchanged.
<em>Ursula Vernon, "<a href="http://www.redwombatstudio.com/blog/?p=5239">Elegant and Fine</a>”</em>

Susan let her tears fall freely when she and Peter heard the news.
<em>pukingtoreador, "<a href="http://www.fanfiction.net/s/2831948/1/The-Real-Reason">The Real Reason</a>”</em></blockquote>

And, because not everything is necessarily Narnia (or, at least, not directly),

<blockquote>It reminded her of Porphylia and everything she wanted to forget.
<em>Jo Walton, "<a href="http://www.strangehorizons.com/2000/20001023/relentlessly_mundane.shtml">Relentlessly Mundane</a>”</em>

You saved our kingdom and found your self-confidence.
<em>Randall Munroe (xkcd), "<a title="xkcd 693" href="http://xkcd.com/693/">Children's Fantasy</a>”</em></blockquote>

In the visual mode editor, that's all squashed up. There are no breaks between each individual quote. In preview, the first blockquote behaves exactly as I want it: the reference for each quote appears directly beneath it, with no gap, and then there's a gap before the next quote. Lovely. It took ages and a lot of faffing about to get it like that, and I had to go into text mode and delete linebreaks and replace them with <br> tags (which then disappeared when I went back to text mode later, but obviously were still there in effect because it worked).

The post hasn't been published yet, but in preview that top section looks fine.

But today I added the second blockquote, at the bottom. And I tried exactly the same trick. And this time it's not working.

Still, in the visual editor, everything's squashed up. But this time, in the preview, everything's spaced out.

Here's an extract of the first blockquote, showing everything aligning correctly: single linebreaks where I want them, and double linebreaks where I want them:

Screenshot of blog preview

And here's another screenshot, showing that the second blockquote has unwanted linebreaks:

Screenshot of blog preview

The backward quotation marks are, probably, another problem for another day.

share|improve this question
    
Incidentally, this post is now published. The quotation marks are correct, not backward as they were in preview (dunno what happened there, but it's good). The <small> formatting has been dropped, but it's okay (and I'm afraid to edit it in case anything else breaks). –  TRiG Jan 21 '13 at 14:15
add comment

2 Answers 2

br and p tags get stripped out and converted to newlines, they're not added until the post content is output. See the codex entry for the wpautop function, this is what is converting those newlines to br and p tags on the_content. It's difficult to say what exactly is going here in this case though. I find it easier to stay in visual mode and shift-return the linebreaks in there and hard-return where I want the paragraphs.

share|improve this answer
add comment

If it makes it easier, you can use the TinyMCE Advanced plugin and it'll give you an option to not remove <p> or <br> tags

share|improve this answer
    
I installed that plugin, opened the post, made no changes at all, hit preview, and it worked. So ... I dunno what happened there. –  TRiG Dec 30 '12 at 15:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.