Support » Themes and Templates » XHTML isn’t possible without checking tags in ent

  • For the first time, I clicked on the W3C XHTML validator link. It failed because of mismatched tags. Since I didn’t want to go back and fix those, I removed the XHTML headers and the link to W3C.
    Just a thought… we can’t do XHTML unless we validate upon posting, right?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Actually it probably is misleading to have the ‘valid XHTML’ link in index.php. The only way you can guarantee that the page will be valid XHTML is for the user to know what is valid code and what isn’t. All it takes is for them not to know that XHTML requires a closing tag in <img> and <br> – both commonly used tags – and there goes validation. Not to mention the handful of WordPress users who seem to think that <font> is OK. Maybe users should have to pass a pop quiz on XHTML and CSS before being allowed to proceed to the download page 😉
    Users should be aware that if they are not 100% confident that they are capable of coding valid XHTML, they must use quicktags to insert markup rather than attempting to do so manually. Otherwise the validation link is worthless. False claims that a page is XHTML-compliant devalue the effort that the rest of us put into making our sites validate.

    if u post text, page should not break.
    if u post html tags u just need to take a lil care.

    I must admit, in four months of using WordPress, I didn’t pay attention to XHTML. I only noticed when I was edited the template. (If I had known, I would have been more careful, and wouldn’t enter HTML tags manually.)
    I don’t think we can count on non-technical users to keep the HTML clean. So I think WordPress should either validate the posts, or remove the XHTML headers and W3C link.

    wp dont control the content. it provide a platform for users to put content.
    i dont think tinkering with the content would be nice coz that can go to unpredictable limits.

    Actually, making a post filter to make some common tag errors in post text validate upon display shouldn’t be too hard. At least, making it close the br and img tags is just a matter of some clever preg_replaces.
    I think I’ll work on that…

    mparaz – if you want to remove the XHTML and W3C links, that completely up to you. Out of the box, WP is XHTML and W3C valid. Even I’ll admit that I’ve done some posting that wasn’t compliant, but that was on some rather complicated postings. Sometimes I care and I’ll go back to fix the posts other times not.
    If there was a way to validate upon posting, that would be great. Maybe make it an optional thing to do????

    This HTML-Tidy idea would work only if it was transparent. But then we have users thinking they have sent valid xhtml, and are stumped why it doesnt work now when it worked in the past.
    I guess the conclusion is that WordPress wouldn’t be the correct platform to enforce standards: it starts and ends with what the user types.
    Or we could just have wordpress default to sending the mime-type “application/xhtml+xml” to accepting browsers and let the problem take care of itself. 😀

    I don’t really have an opinion on whether or not WP should make each post XHTML compliant, but I’ll be the first to admit that I’m an absolute maniac if something doesn’t come out with the compliant stamp. I can’t explain why, but there’s a certain sense of satisfaction in saying that I meet the standard. Call it odd, I call it brevity! (or some other word I’m too unclever to think up)

    If I replace all < br > with < br /> but keep
    untouched, this will not pose problems with tags that already are valid xhtml, right? 🙂 Then everything will just work and just validate, regardless of how you typed it. WordPress does a good job on a lot of these things already – for example, it translates html entities. This tidying plugin shouldn’t do more than it’s really meant to do – correct markup habits tailored for old html. You can’t have everything anyway.
    Though with some thinking, it’s possible to even translate font tags into style statements on spans and keep most people happy most of the time.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘XHTML isn’t possible without checking tags in ent’ is closed to new replies.