How To Install php-htmLawed on CentOS 7

In this tutorial we learn how to install php-htmLawed on CentOS 7. php-htmLawed is PHP code to purify and filter HTML

Introduction

In this tutorial we learn how to install php-htmLawed on CentOS 7.

What is php-htmLawed

PHP code to purify and filter HTML * make HTML markup in text secure and standard-compliant * process text for use in HTML, XHTML or XML documents * restrict HTML elements, attributes or URL protocols using black or white-lists * balance tags, check element nesting, transform deprecated attributes and tags, make relative URLs absolute, etc. * fast, highly customizable, well-documented * single, 48 kb file * simple HTML Tidy alternative * free and licensed under LGPL v3 and GPL v2+ * use to filter, secure and sanitize HTML in blog comments or forum posts, generate XML-compatible feed items from web-page excerpts, convert HTML to XHTML, pretty-print HTML, scrape web-pages, reduce spam, remove XSS code, etc.

We can use yum or dnf to install php-htmLawed on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install php-htmLawed.

Install php-htmLawed on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install php-htmLawed using yum by running the following command:

sudo yum -y install php-htmLawed

Install php-htmLawed on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install php-htmLawed using dnf by running the following command:

sudo dnf -y install php-htmLawed

How To Uninstall php-htmLawed on CentOS 7

To uninstall only the php-htmLawed package we can use the following command:

sudo dnf remove php-htmLawed

References

Summary

In this tutorial we learn how to install php-htmLawed on CentOS 7 using yum and dnf.