I have to fix this several times a week…please read and heed. I’m hoping that if I announce this as a post, it will reduce the problem.
No wordpress.com can’t fix this issue with comments, I’ve asked.
PLEASE be careful when trying to bold, italicize, link, or blockquote in comments. Just one transposed character is all it takes. Also, there’s no need to try to hyperlink URL’s, WordPress will automatically hyperlink any URL you type in like this:
OK, please note this, then burn it into your mind, slash BEFORE, not after. Thanks for your consideration – Anthony
Discover more from Watts Up With That?
Subscribe to get the latest posts sent to your email.

From Rodney Carrington
What we need is a preview function.
Lots of sites have them.
I thought it was that you won’t allow any discussion on your blog about chemtrails?
My biggest pet peeve – all the people here who don’t understand that their suggestions are things that can’t be done without assistance from WordPress.
Second biggest peeve – that WordPress doesn’t fix the bugs.
Rule to live by – You get what you pay for! All in all, WordPress does a pretty decent job with this free offering.
juanslayton says:
March 19, 2011 at 7:06 pm
While that’s a very good idea, it’s not the problem. If you write a <i> and forget to terminate it, WordPress will terminate it for you at the end of the comment. The problem is when people mistype it – WP apparently thinks it’s an end command, but browsers don’t.
I tried adding my own </i> at the beginning of a comment to see if that would terminate a runaway italics block, but it didn’t work. I guess WP is trying to count the depth of the italics and once out of sync stays out of sync.
The way I do it is to read the HTML comment in to an XML document, and then write out the XML. This closes unclosed tags automatically.
http://www.hoboes.com/Mimsy/hacks/auto-closing-html-tags-comments/
This could be integrated into a WordPress plugin, but I don’t know how much control WordPress gives you over custom plugins.
ATTN!!!! Mods and Anthony, Here;
http://t.co/SSL4B48
is the link to the global ranking of the suggested key words to add to the header section of your pages, so your blog will show up in the search engine results.
Anthony,
I’m a moderator on another blog, and WordPress solves this problem in the edit mode, where each comment has an HTML tool bar directly above the comment. I’ve always wondered why they couldn’t do an abbreviated version of that tool bar in the comment mode with the codes you show below the comments here. Then all the commenters would have to do is highlight the portion to be altered and click on “bold” or “italics” or “delete” or “link”, etc., much like you do in Microsoft Word.
There seems to still be a difference between ranks generated by Google as compared to the other two search engines though.
Nullius,
You are completely wrong. HTML does have valid self closing tags, button, input, hr, br are a few of them. The problem is that HTML is an ugly language which is ill defined. There are far too many tags in HTML which do not require a closing tag. You can’t really deal with this in regular expressions and need a full parser. This is why I recommend HTMLtidy which is a full parser and detects silly mistakes and corrects them. XHTML requires closing tags (whether self closing with a / before the closing > or a / [tag] > for the closing tag. In XHTML every tag requires a closing tag. In HTML this is not the case. HTMLtidy fixes this as best it can and does a pretty good job. Once the input, as filtered by HTMLtidy is clean you can then pass it to the validator (however you implement it) and get far better results in filtering for dangerous tags.
In the system which I write and maintain that means running the input through HTMLtidy and then through an MS security library to get a safe HTML fragment for storing in the DB. There are other libraries which do the same sanitizing of HTML input for PHP. I assume that WP does sanitizing, but it is clear that they do not do correction (provided by HTMLtidy). Hey, it works for me!
Under these circumstances, any reasonable person would turn off HTML tags.
Thanks for not doing that!
So install an RTE.
So simple. Use an RTE or fix coding mistakes. As you can see from the previous comments, most people don’t know how to code. And why should they have to?
http://tinymce.moxiecode.com/
Personally, I avoid adding tags manually.
Anthony, have you considered the “Quicktags” plug-in? If people had a button to do it on the comment box, that’d cut down greatly on manual editing errors.
OK boys and girls.
Here is a short tutorial for all you folks with really fat fingers.
http://www.gojackets.com/help/tutorial.shtml
Here’s a simple comment html composition, and preview, method that works on almost any blogging service, or forum.
Windows Live Writer is free. And it’s very compatable with WordPress, as well as a lot of other blogging services. If you compose a comment, or post with Live Writer, it’ll format the html for you. You get a WYSIWYG environment to compose a comment in. And when you’re done, simply toggle from the ‘Edit’ view, to the ‘Source’ view, to see it displayed as html. You can then copy, and paste, your comment from Live Writer’s ‘Source’ view for perfect html every time.
REPLY: And that is what I asked wordpress.com for…no can do -A
Wow, really? They said no to that? That’s terrifically bad customer service.
And they said computers would make our lives sooooo much easier…
Maybe overly simplistic but why not just switch your commenting engine to IntenseDebate or Disqus instead of the WP default? They even import the old WP comments?
Like the moderator said earlier Word is very bad for HTML. Use a plain text app like Notepad. We use Dreamweaver at work, but most people can’t afford the latest Adobe Suite.
Amazing to me that WordPress is unable to resolve this very simple problem. A real simple piece of code could fix this issue easily. I use this technique in many applications that I have written. This is one of those things that makes me go “hmmmm”….
Hint to WordPress: Learn a little bit about regular expression parsing…. 😉
Rattus Norvegicus says:
Tell the geeks at WordPress that HTMLtidy can fix lots of egregious problems in user entered HTML. There is no excuse.
Wordpress is free, open source software, isn’t it? Then, noone can really blame the geeks at WordPress since users are enabled to fix it themselves.
But, Squidly -as others have pointed out- HTML does not follow regular expression rules consistently. There are a countable number of self-closing tags, which would make the project non-trivial.
The very simplest solution would be disable all HTML tags in comments. Even then one could enter a link as text.
The next simplest solution would be a preview function, but I can’t say if that’s part of the base WordPress set, or requires some sort of plug-in. The milblog neptunuslex.com (highly recommended) runs WordPress and features a preview function for comments. Perhaps you could contact Lex and ask him about that?
A solution like TinyMCE is not a good idea. Bad security, heavy on bandwidth and performance. My preference for public facing user input forms is BBCode. There’s a great BBCode parser in PHP called NBBC.
I made a very little, 10 tag javascript RTE plugin for this library and you can convert BBCode to HTML either going into the database(higher performance) or coming out(more extensible). Surely there is something out there like this for WordPress.
Also, a comment preview would help catch alot of this stuff.
Well, it’s not just that I am a bit lazy – but when I want to write a comment I really cannot be bothered to alter font and style, etc. It detracts from my line of thought, and I am always concerned I’ll get it wrong! Hence, no change for me!