WordPress.org

Ready to get started?Download WordPress

Forums

invalid XHTML -- blockquote (15 posts)

  1. jadler
    Member
    Posted 9 years ago #

    Trying to validate my blog gives errors, some of them from my changes to index.php, some from the plugin Recent comments, but one straight from WordPress.

    If you look at http://validator.w3.org/check?uri=http%3A%2F%2Fnyfiken.org%2Findex.php%3Fp%3D17 you will see that the usage of blockquote is not valid xhtml. I am not sure why, but I am sure that some of you do.

    Maybe there should be no p-tags around the blockquote?

  2. vinnie
    Member
    Posted 9 years ago #

    A blockquote has to have a block-level element (like a paragraph or a list) inside of it before any text content shows up.

  3. jadler
    Member
    Posted 9 years ago #

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

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

  4. TechGnome
    Moderator
    Posted 9 years ago #

    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

  5. jadler
    Member
    Posted 9 years ago #

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

  6. TechGnome
    Moderator
    Posted 9 years ago #

    shrug - it's always handled it right for me.... but I also never moved to 1.2.1.

    Tg

  7. TechGnome
    Moderator
    Posted 9 years ago #

    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

  8. NuclearMoose
    Member
    Posted 9 years ago #

  9. BenDG
    Member
    Posted 9 years ago #

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

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

  10. bl
    Member
    Posted 9 years ago #

    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.

  11. bl
    Member
    Posted 9 years ago #

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

  12. KerimFriedman
    Member
    Posted 8 years ago #

    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.

  13. Darcie
    Member
    Posted 8 years ago #

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

  14. KerimFriedman
    Member
    Posted 8 years ago #

    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.

  15. Jaykul
    Member
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.