University of Michigan Cellular and Molecular Biology graduate student.

Removing “_blank” in Movable Type Comments

17 Jun 2003

A lot of MT users are angry that <$MTCommentAuthorLink$> breaks XHTML 1.0 and 1.1 validation. This has been pointed out by a number of people but I think Jay Allen was the first to publicly post about it. I’ve been using a different tag for quite some time that validates and hides people’s e-mail addresses. This is a good thing because leaving your visitors e-mail addresses in the comments section makes it easy for bots to harvest the addresses.

This fix only applies to users using static comments that are displayed on the individual archive page.

Replace <$MTCommentAuthorLink$> with <$MTCommentAuthorLink show_email="0"$> and that should validate. While you’re at it, install MTSimpleComments, written by Adam Kalsey, which integrates comments and trackbacks into the same section.

For those of you that want to show e-mail addresses, you’ll have to do hacking. In your Movable Type directory, browse to /lib/MT/Template and open up Context.pm. Do a search and replace for target="_blank". There should be three instances that you need to remove.