How to Automatically Remove Spam Links from Blogger Comments



Automatically Remove Spam Links from Blogger Comments

Comment Spam is a major issue for all bloggers and identifying/removing spam comments is among the most frustrating job for a blogger. We all love comments but identifying spam comments from hundreds of comments is the toughest job, especially when you don't have time to moderate all those comments. Obviously you don't want to remove all comments just for a few spam comments. As we know that Blogger doesn't have a real-time spam detection plugin, so its your job that how you manage with spam comments. Today, in this article, we will show you that How to Automatically Remove Spam Links from Blogger Comments.

Method I : Use CSS to Completely Remove Links

Step 1. Log in to your Blogger Account
Step 2. Select your Blog >> Template >> Edit HTML and search for the ]]></b:skin> tag
Step 3. Copy the below code and Paste it just above/before it

.comment-content a {
display: none;
}

Step 4. Press the Save Template button and you're done

Method II : Use jQuery to Remove Links

Step 1. Log in to your Blogger Account
Step 2. Select your Blog >> Template >> Edit HTML and seach for the <body> tag 
Step 3. Copy the below code and Paste it just after/below it

 <!-- Remove Spam Links -->
<script>$('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});
</script>
<!-- Remove Spam Links -->

Step 4. Press the Save Template button and you're done