A new WordPress installation allows readers to leave comments containing certain HTML tags by default, including a, abbr, b and i. Unfortunately, using <b> for bold and <i> for italics is deprecated, unsemantic, and very un-Web 2.0. So how do you force your readers to use the proper markup - <strong> for bold and <em> for italics - in their comments?
The fix lies in kses.php, which lives in the wp-includes directory in the root of a WordPress install. In the latest version (2.3.2 at post time), simply jump to line 186 and edit the members of the $allowedtags array, commenting out nasty, unsemantic tags:

Removing the deprecated <b> tag from WordPress’ list of allowed comment tags.
You can even add new tags that don’t come enabled by default. This is particularly useful for enabling the <img> tag to allow visitors to post images in their comments.
One final reminder - unless your blog is in the web development niche, most readers aren’t going to know <strong> and <em>. You might want to add a blurb to comments.php (in your themes directory) explaining why these tags are better than their old-school counterparts.
Technorati Tags: design, development, standards compliance, wordpress, xhtml
Like it? Love it? Hate it but want to read more anyway?
Subscribe to my RSS feed and keep up!

09 Jan 2008 at 10:12 am
So then, why are they better than their old-school counterparts?
I knew that they existed, but I’ve always just stuck to the old <b> and <i>.
09 Jan 2008 at 10:13 am
And apparently you also can’t use character codes in comments. Drat.
09 Jan 2008 at 8:09 pm
@Some guy in Japan:
The simple reason is that web designers should strive to separate content from presentation. The b and i tags are by their nature introducing presentational markup into the document, whereas strong and em semantically specify what should be emphasized.
Screen readers for the blind also treat strong and em’d text by reading it in a stressed or emphasized voice, making sites more accessible for the disabled.
Jason at JasonGraphix explains it much more clearly than I can…
10 Jan 2008 at 3:56 am
Cool, thanks for the explanation and link. It sufficiently answered my question :p