• I’ve coded up a plugin, X-Valid, which should ensure that all posted content outputs valid XHTML. This is inline with WordPress’ own standards adherence. This replaces my previous attempt at solving this problem, CounterBalance, which wasn’t a particularly intelligent solution!
    It handles incorrectly nested tags and improper attribute values and works one time only at the point of posting or editing. If problems are found that can’t be fixed automatically, a window pops up listing the errors. This feedback can also be set manually by checking a box at posting time.
    Find it here: https://www.jamietalbot.com/wp-hacks/
    Installation is simple; unzip the file and save it in the plugins folder, then activate it from the Plugins menu. A small message appears under the main content editing box when it is correctly installed. You should disable WordPress’ own tag balancing, if enabled, which will probably clash and is a little buggy anyway. The feedback uses a temporary file stored in the wp-content folder, so this must be writable. (Incidentally, devs/authors is this the best place to store such a thing?)
    It handles a wide range of markup errors, has performed well on a lot of test cases and has never removed any text, as WordPress’ own balancing solution occasionally does.
    Comments, feedback, improvements, bug-reports all welcome! Contact info on the download page, or post here…
    Hope it helps someone, and thanks to the peeps on the hackers mailing list for thoughts and input along the way!
    Jamie.

Viewing 5 replies - 1 through 5 (of 5 total)
  • This is great! I’m sure 90% or more of my xhtml errors are introduced via my own posts!
    Good stuff. Thanks for contributing!

    Thread Starter majelbstoat

    (@majelbstoat)

    No probs, glad you found it useful! Let me know any problems if you find them…
    J.

    What about comments? Can this plugin convert posted comments into ‘X-Valid’ ones? I can ensure that my posts are valid XHTML, but I cannot force every commenter on my blog to write XHTML, nor do I wish to. But if this plugin can take the comments and convert them into valid XHTML, it would be really a great one.

    Thread Starter majelbstoat

    (@majelbstoat)

    That’s the next aim ?? Hope to release a version that will do this soon. Shouldn’t be too much trouble I don’t think, just adding a hook to the right place. Will try and get it out soon. Thanks for checking it out!
    Jamie.
    PS: Incidentally, one user reports some problems with href attributes, though hasn’t provided any details yet. Has anyone seen what they think is a problem with this? Thanks in advance…

    Thread Starter majelbstoat

    (@majelbstoat)

    Hi!
    I just uploaded version 0.85 which includes automatic correction for comments posted to the site. If any problems cannot be fixed, the post author is emailed with a list of the problems and a link to edit the comment manually.
    The email itself is rudimentary and will be cleaned up in future versions, but for now should suffice.
    If there are any problems please let me know. Thanks.
    You can find the updated plugin at:
    https://www.jamietalbot.com/wp-hacks/
    Cheers!
    Jamie.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘New Plugin: X-Valid’ is closed to new replies.