WordPress.org

Ready to get started?Download WordPress

Forums

XHTML isn't possible without checking tags in ent (10 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    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?
    Migs
    http://migs.paraz.com/w/

  2. WillM
    Member
    Posted 10 years ago #

    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.

  3. OperaManiac
    Member
    Posted 10 years ago #

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

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    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.

  5. OperaManiac
    Member
    Posted 10 years ago #

    whoa...
    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.

  6. KAShirow
    Member
    Posted 10 years ago #

    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...

  7. TechGnome
    Moderator
    Posted 10 years ago #

    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????
    TG

  8. Stevarino
    Member
    Posted 10 years ago #

    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. :D

  9. chuckg
    Member
    Posted 10 years ago #

    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)

  10. KAShirow
    Member
    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.