1 PREREQUISITES: Make sure you check HTML Purifier and make sure that you
2 have fulfilled all of its requirements before running this. Specifically,
3 you'll need the PHP extension ctype (in almost all PHP distributions),
4 and it's nice to have dom and iconv.
6 * Place the htmlpurifier folder in your drupal modules directory.
8 * Download HTML Purifier from http://htmlpurifier.org/ You will need
11 * There are two possible ways to install the HTML Purifier library.
13 1. Module directory installation. This means installing the library
14 folder under the module directory. This way has the advantage of
15 not depending on other modules. The issue is that when you
16 upgrade the htmlpurifier module the HTML Purifier library gets
17 removed and you have to re-extract the archive in the newly
18 installed module directory.
20 2. The preferred way is making use of the libraries API,
21 http://drupal.org/project/libraries. This makes the library
22 available to all sites or to a specific site in a multisite
23 Drupal setup. You'll need to download the libraries API module
24 and enable it before enabling the htmlpurifier module so that in
25 the install phase it can find the library.
27 Extract the library folder to sites/all/libraries or to
28 sites/<site>/libraries for a specific site in a multisite Drupal
31 The final setup should be, when making the library and module
32 available to all sites:
34 sites/all/libraries/htmlpurifier/
36 HTMLPurifier.autoload.php
39 HTMLPurifier.includes.php
43 HTMLPurifier.safe-includes.php
45 Now you can safely upgrade your htmlpurifier module without
46 having to re-deploy the HTML Purifier library.
48 * Go to Administer > Site building > Modules and enable this module
50 * You can now create a new input format or add the HTML Purifier to an
51 existing input format. It is recommended that you place HTML Purifier as
52 the last filter in the input format. Reorder the filters if necessary.
54 WARNING: Due to HTML Purifier's caching mechanism, dynamic filters MUST NOT
55 be placed before HTML Purifier.