How To Install libhtml-defang-perl on Debian 10

Learn how to install libhtml-defang-perl on Debian 10 with this tutorial. libhtml-defang-perl is cleans HTML and CSS of scripting, executable contents and XSS attacks

Introduction

In this tutorial we learn how to install libhtml-defang-perl on Debian 10.

What is libhtml-defang-perl

libhtml-defang-perl is:

HTML::Defang accepts an input HTML and/or CSS string and removes any executable code including scripting, embedded objects, applets, etc., and neutralises any XSS attacks. A whitelist based approach is used which means only HTML known to be safe is allowed through.

HTML::Defang uses a custom html tag parser. The parser has been designed and tested to work with nasty real world html and to try and emulate as close as possible what browsers actually do with strange looking constructs. The test suite has been built based on examples from a range of sources such as http://ha.ckers.org/xss.html and http://imfo.ru/csstest/css_hacks/import.php to ensure that as many as possible XSS attack scenarios have been dealt with.

There are three methods to install libhtml-defang-perl on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libhtml-defang-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libhtml-defang-perl using apt-get by running the following command:

sudo apt-get -y install libhtml-defang-perl

Install libhtml-defang-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libhtml-defang-perl using apt by running the following command:

sudo apt -y install libhtml-defang-perl

Install libhtml-defang-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libhtml-defang-perl using aptitude by running the following command:

sudo aptitude -y install libhtml-defang-perl

How To Uninstall libhtml-defang-perl on Debian 10

To uninstall only the libhtml-defang-perl package we can use the following command:

sudo apt-get remove libhtml-defang-perl

Uninstall libhtml-defang-perl And Its Dependencies

To uninstall libhtml-defang-perl and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove libhtml-defang-perl

Remove libhtml-defang-perl Configurations and Data

To remove libhtml-defang-perl configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge libhtml-defang-perl

Remove libhtml-defang-perl configuration, data, and all of its dependencies

We can use the following command to remove libhtml-defang-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libhtml-defang-perl

Dependencies

libhtml-defang-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libhtml-defang-perl package on Debian 10 using different package management tools: apt, apt-get and aptitude.