Let computers fix our HTML
And I don't mean let them put in tags for us as we type plain text into an edit field. I would like WP:
- To convert an entire blog from XHTML to HTML for me
- To convert from (X)HTML Transitional to Strict
It borders on impossible to make those changes manually if, after a thousand posts, you decide to go Strict or drop the X.
It would be easier to do if WordPress used a completely different markup system (i.e. Textile) and converted it to an (X)HTML system on the fly.
This is a job for a script that runs the necessary database queries (presuming that you're talking about content), not for WordPress.
The trouble with Textile, Jeremy, is that it's very resource-intensive. Plus it quite often gets things wrong (because some contexts are tricky, and the server can't read your mind).
The vast majority of the user-base has no use for this; besides, there is only a very small difference in tags that you would actually use between HTML and XHTML. It would be far simpler just to use the search and replace plugin.
Supporting a subset of Textile should not be too resource intensive (I have written some PHP code that does this and found that the process is pretty much a preg_split, foreach/preg_replace sequence for a post, for each basic tag.)
Supporting just the basics for comments, *bold* _empahsis_ etc., would not be a bad start. For just a few tags it actually is not very tricky. It also makes it less likely that users will mix up or not close HTML tags.
(One could even consider that there would be a potential saving of post/comment size, as HTML tags about four times the number of characters to mark up.)
Of course, changing formats for for an established site and having to convert all posts would pose an interesting challange to an upgrade script, but pretty much only for converting from HTML to tags.
Agree with Ajd777 above: this is a job for a script, not for WordPress. Also, the choice for HTML or XHTML lies pretty much at the theme level, so in a way this is already perfectly possible.
I'd like to +1 the idea of supporting Markup... I moved from "Simplelog", a very barebones blog tool. But one thing it supported was markup via Textile and other syntaxes. I find it much easier to write long posts in a markup language like Textile or Structured Text then in HTML.
Epugh, what you describe sounds like plugin functionality. There are numerous plugins which provide WP with support for other syntaxes; see TextControl for a good overview.
Unfortunately, the choice of HTML or XHTML is not at the theme level. I have tried. At the very least a barebones WP 2.3 install includes via wp_head() the following:
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://novo-designed.com/wordpress/xmlrpc.php?rsd" />
Which doesn't validate to HTML 4.01 Strict. Then you start adding plugins that insert code, and it's all over.
I'd love for some tool that parsed the file on its way to the browser and edited it for basic changes, to make it easier to comply with HTML, etc.
Just me, I guess.
I see on the Kvetch pages a lot of complaints about TinyMCE auto-fixing things where it shouldn't.
I have some bad experience with em too, particularly about tables and code-highlighting plugins you know the & and < and > in TinyMCE will cause messy unwanted html formattings in the output
I think those problems already stem from TinyMCE trying to convert your code to proper (X)HTML which it cannot do it reliably enough.
At least if you are really putting in more auto-formatting code, please provide us with some means to *completely* turn it off.
RSS feed for this topic
You must log in to post.