Does Your Blog Comments Strip HTML and Links?

Filed as Features on January 15, 2008 9:13 pm

If your blog comments strip HTML and links when published, you are missing out on a meaningful part of the blog conversation.

I am always getting comments with links in them on my blogs. They direct the readers and myself to similar or related information, often information I need and have requested. I love links such as tips on how to do it better, answers to questions, or instructions on how to fix what’s broken, or links to their post so they can show off what they wrote, inspired by my work.

Unfortunately, comment spam is stuffed with links, making bloggers wary of comments, and many are taking drastic measures to exclude links from blog comments.

With HTML turned off or stripped away, all they can do is paste the link as part of the text. Long, unwieldy links that stretch across the comment form box, often breaking your blog’s web design. Long URL addresses can push your design’s containers and columns around, pushing your sidebar down below the content or overlapping the sidebar, making it difficult to read and see. By allowing links to be wrapped inside of HTML anchor tags, you can protect your blog’s design and make it look better, too.

Example of a link in a comment distorting the web page design

When you strip out the HTML, you are hurting your commenters and wasting everyone’s time, in more ways than just removing HTML anchor links.

Restricting Links on Your Blog Comments

Since we know for a fact that comment spammers thrill in getting as many links stuffed into their evil comments as possible, why not put a restriction on the number of comments that can be included in your blog’s comments?

WordPress allows you to set the maximum number of links permitted, and any comments exceeding that number are automatically put into moderation, where you can verify the comment’s legitimacy.

On the WordPress Administration Panels, go to Options > Discussion and scroll down to Comment Moderation. In the box, set the number of links you will permit before automatic moderation kicks in. I’ve chosen 4 on but 2 on , as each blog attracts different types of comments and I set them accordingly.

Setting the link limit in comments with WordPress

When a comment is set in moderation, it still appears in your Comments Panel and recent versions of WordPress allow you to approve the comment directly from there, without accessing your Moderation Panel.

Losing The Ability to Add Personality to Your Comments

Typing words into blog comments doesn’t always convey the full meaning, and smilies are not always a good option. Using Bold/Strong and Italic/EM helps add emphasis to the comment’s words so their intention is clear, even if the words don’t reflect it.

By default, WordPress blogs do not strip all HTML code from comments, only selected code like lists – something I’ve never understood. I hate that WordPress strips UL and OL lists out of comments. I’m often asked for a list of articles, tips, or step-by-step instructions and I want to leave a list in the comments. Knowing that, I’m stuck with using numbers or asterisks instead. Not much punch and no indentation.

When leaving a comment and then finding the links are all stripped after the page reloads, or getting an error that tells me that my comment won’t work, then going back to find I have to totally rewrite the comment again – it makes me not want to come back.

When writing a comment is too much work, I’m gone. If the comment form process asks me repeatedly for CAPTCHAs or torture tests, I’m gone. If it’s too much hassle to comment, I won’t comment, and I probably won’t come back.

Do you?

Links, especially, are critical to web communication, as are the ability to add HTML emphasis within our comment content. If your blog is stripping HTML from within your blog comments, you may be missing out on helping your readers add more to the blog conversation.

Tags: ,

This post was written by

You can visit the for a short bio, more posts, and other information about the author.

Submissions & Subscriptions

Submit the post to Reddit, StumbleUpon, Digg or

Did you like it? Then subscribe to our RSS feed!

  1. By Mike Goad posted on January 15, 2008 at 9:57 pm
    Want an avatar? Get a gravatar! • You can link to this comment

    Part of blogging, for me, is visiting other blogs and commenting. Lately, I’ve been including more links and – when I really like a post – giving it a thumbs up on stumbleupon.

    If I have to work to get a comment in, I won’t. If I have to join a blog or a blogging community to comment, chances are that I won’t. ;)

    Great post as always!


  2. By David LaFerney posted on January 15, 2008 at 11:55 pm
    Want an avatar? Get a gravatar! • You can link to this comment

    Great post. With all of the great tools available to help control comment spam it’s hard to understand why so many bloggers seem to be so stingy – rejecting links, trackbacks, and pingbacks. We should all fight spammers by rewarding good behavior.


  3. By Matt posted on January 16, 2008 at 12:23 pm
    Want an avatar? Get a gravatar! • You can link to this comment

    I totally agree, Lorelle!
    If I make a serious comment on someones blog the blog author shouldn’t have any problems with me linking in a comment.
    If I just write stupid spam, usually Akismet or some other plug-ins kick in, so I don’t really see the problem!
    It is always better to not restrict your visitors and especially, if you have just a very small blog, every comment you loose due to your restriction is a severe loss!

    If you really think some comment has to many links, you can always re-edit them…


  4. Le ultime notizie più succulente dal mondo dei blogs - Edizione del 16 gennaio 2008 | MondoBlogJanuary 16, 2008 at 1:20 pm
  5. By Thomas Gilberto posted on January 17, 2008 at 3:50 pm
    Want an avatar? Get a gravatar! • You can link to this comment

    Linking is the universal languahe all bloggers understand. Weblogs that disallow links are making communication more difficult than it should be.


  6. By Malou Wang posted on January 18, 2008 at 6:37 am
    Want an avatar? Get a gravatar! • You can link to this comment

    Allowing to put link on their blog has an advantages and disadvantages as well in web design and development. Advantages that it could create a wide spread of sharing and knowledge from you visitors but the disadvantages it could create spam commenting to your blog.


  7. Stripping Your Readers » Reader Appreciation ProjectFebruary 4, 2008 at 9:06 pm
  8. By Carl posted on February 11, 2008 at 11:57 am
    Want an avatar? Get a gravatar! • You can link to this comment



  9. By xHTML Coding posted on September 15, 2008 at 9:38 am
    Want an avatar? Get a gravatar! • You can link to this comment

    I’ve been trying to figure an effective way to combat these link spammers for quite a while now.

    The major problem is that most of these spammers run on automated bots and they don’t seem to care about anti-link-spammers.

    Even though I try to add the filter which automatically deletes comments which have over 3 links, they continue trying to post it and use up a lot of my server space and bandwidth.


  10. By don posted on November 9, 2009 at 10:48 pm
    Want an avatar? Get a gravatar! • You can link to this comment


  11. By Laura Rispoli posted on May 30, 2010 at 2:31 am
    Want an avatar? Get a gravatar! • You can link to this comment

    Does anyone know of any blog communities that also encourage html photos in comments. I would like to share my work. I’m a freelance artist and it has now occured to me that my fellow blog readers may be interested in checking out my fine art at I take painting, portrait and graphic design commissions and would be so appreciative if anyone would check out my site at and please contact me. Sincerely, Laura Rispoli


    Your words are your own, so be nice and helpful if you can. If this is the first time you're posting a comment, it might go into moderation. Don't worry, it's not lost, so there's no need to repost it! We accept clean XHTML in comments, but don't overdo it please.