Book Image

Liferay 6.x Portal Enterprise Intranets Cookbook

Book Image

Liferay 6.x Portal Enterprise Intranets Cookbook

Overview of this book

Table of Contents (19 chapters)
Liferay 6.x Portal Enterprise Intranets Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Intranet protection by the antisamy-hook plugin


Liferay 6.x exposes a new functionality called sanitizers. This is an implementation that protects content (HTML and JavasScript) against malicious code that users may pass to the journal article, wiki, message board, and so on. This can happen if a user copies and pastes the content from any Internet resources. In the Liferay core implementation, there are no sanitizers. One of the reasons is that Liferay allows users to implement their own policy and install it as a hook plugin. Fortunately, Liferay has a plugin called antisamy-hook in the official GitHub repository at https://github.com/liferay/liferay-plugins/tree/master/hooks/antisamy-hook.

In this recipe, we will show you how to install this plugin and also give you an idea about how it works.

How to do it…

The antisamy-hook plugin, like other plugins, is available on the official Liferay marketplace. Therefore, the installation process is really simple and unified. In order to achieve your...