Converting Active Link Comments To Plain Text

Table of Contents
Converting Active Link Comments To Plain Text

Commenting is something we are used to in the blogging world. But what happens if someone puts an active link in our blog comments without the permission or knowledge of the blog admin, of course this will harm us if the link in the comment column is disabled which can cause broken links on our blog.

There are many ways and blog tutorials to overcome active links on blogs. But some of them are still not optimal because when viewed through the inspect element, it turns out that the link is still legible and only the appearance is changed to the text we want.

With the help of javascript every comment that uses an active link will automatically become plain text, and links that are inserted into the comments column will not be read and only read as plain text.

Converting Active Link Comments To Plain Text

For those of you who want to try or use it on a blog. Here's how to convert active links in blog comments to plain text:

1. Go to blogger menu > Click Template > Edit HTML

2. Find the following code </body>

3. Copy the code below, and paste it above the code </body>

<script type='text/javascript'>
//<![CDATA[
$(function(){$('#comments p').find('a').contents().unwrap();});
//]]>
</script>

4. Save the template

That's how to change the active link of comments to plain text in this article. May be useful.

ANDD
ANDD Daily workers

Post a Comment