Support » Themes and Templates » invalid XHTML — blockquote

Viewing 14 replies - 1 through 14 (of 14 total)
  • A blockquote has to have a block-level element (like a paragraph or a list) inside of it before any text content shows up.

    Thread Starter jadler

    (@jadler)

    OK, so misnested p-tags and blockquote, then?

    Should be
    <blockquote><p>
    instead of
    <p><blockquote>

    no, no, no…..

    the blockquote has the same weight as a block level element such as a p. The way it *should* be is thus:

    <p>text </p>
    <blockquote>Your quote goes here</blockquote>
    <p>next para here</p>

    At least that’s how I’ve always done it and it has validated just fine.

    Tg

    Thread Starter jadler

    (@jadler)

    OK, I understand. But qnyway, WP does not handle the blockquote tag properly (1.2.1 at least). Maybe next version could?

    shrug – it’s always handled it right for me…. but I also never moved to 1.2.1.

    Tg

    OK, so I sit corrected.Running 1.5nighly from the 28th, I see that it does in fact put p tags around the contents of the blockquote (on the inside, not outside). I can’t speak for any other previous version though.

    Tg

    So it should be like this:
    <blockquote><p>blabla</p></blockquote>

    Or even:
    <blockquote>
    <p>blabla</p>
    <p>some more bla</p>
    </blockquote>

    So how do I enter text and blockquote information in my post to get that result? Is it possible? I’ve tried all combinations of blockquote and paragraph tags with blank lines (or not) that I can think of. I still get either a paragraph or break tag immediately before the blockquote tag.

    Got it fixed! I discovered I had activated the Textile 2 plugin. When I deactivated it, WordPress behaves the way I want it to.

    I can confirm that this is a problem with the Textile plugin (versions 1 and 2.6b).

    Has anyone come up with a solution that doesn’t involve deactivating Textile? Some members of my blog depend on it.

    I have not quite figured out what Textile is for in the first place

    Darcie: Textile is an alternative system of encoding that some people prefer to HTML for its simplicity and ease of use. Ideally you can offer people a choice of either using Textile or HTML to encode blog entries, however, it seems that the two interfear with each other in the case of blockquotes.

    I found a temporary fix, by reading this page. It seems that if the <blockquote> tags appeare after a space at the beginning of the line, Textile won’t encode them. So, if you write your code like this, it will work:

    [Damn, it is impossible to properly show the formatting of the code in these forums, even using backticks!]

    Both the opening and closing tags need to be at the beginning of the line, with a space right before the code. I tested this on two systems and it works. Hopefully the makers of the Textile plugin will repair this bug, since one should really be able to use HTML encoding even if the Textile plugin is turned on.

    If you’re using textile … you should be using “bq. ” at the begginning of the line for blockquotes, not the

    tag …

    You can use xhtml while using textile, but you need to take into account that you are using textile. Which is to say: if you leave a blank line, textile is going to start a new paragraph for you, unless you’re in a <notextile> block, so to accommodate the fact that your are using textile, you need to put a leading space on the line if you’re starting a block-level xhtml tag after blank lines … or: a) use textile markup, or b) wrap the whole thing in <notextile> tags.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘invalid XHTML — blockquote’ is closed to new replies.