Release 4.15.0
[htmlpurifier-web.git] / download.xhtml
blobc8b0120169dfffe562098534e58aafe30ff1dfb6
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
4 <!ENTITY % htmlpurifier.current SYSTEM "current.ent"> %htmlpurifier.current;
5 ]>
6 <html
7 xmlns="http://www.w3.org/1999/xhtml"
8 xmlns:xi="http://www.w3.org/2001/XInclude"
9 xml:lang="en">
10 <head>
11 <title>Download - HTML Purifier</title>
12 <xi:include href="common-meta.xml" xpointer="xpointer(/*/node())" />
13 <meta name="description" content="Download HTML Purifier, the standards-compliant HTML filter library." />
14 <meta name="keywords" content="HTMLPurifier, HTML Purifier, HTML, filter, filtering, standards, compliant, w3c, download, zip, tarball, tgz, sig, gpg, gnupg, sha1, hash, checksum" />
15 </head>
16 <body>
18 <xi:include href="common-header.xml" xpointer="xpointer(/*/node())" />
20 <div id="main">
21 <h1 id="title">Download</h1>
23 <div id="content">
25 <p>
26 The current version of HTML Purifier is
27 <strong>&htmlpurifier.current.version;</strong>, released on
28 &htmlpurifier.current.release-date;, and is tested with
29 <abbr>PHP</abbr> 5.3 and up (all code is <code>E_STRICT</code>
30 compliant). This library is open-source,
31 licensed under the <a href="http://www.gnu.org/licenses/lgpl.html"><abbr>LGPL</abbr>
32 v2.1+</a>. We offer multiple ways of downloading
33 and installing HTML Purifier. You might also be interested
34 in the <a href="https://github.com/Mynigma/HTMLPurifier">Objective C port</a>.
35 </p>
37 <div id="toc" class="floated" />
39 <!--
40 <h2 id="Errata">Errata</h2>
42 <p>
43 Here is a list of known bugs. These issues have all been fixed in the
44 <a href="#NightlyBuilds">trunk</a> unless
45 otherwise noted:
46 </p>
48 <ul>
49 </ul>
50 -->
52 <h2 id="Standard">Standard</h2>
54 <p>
55 We offer the standard zip and tarball downloads. Download them,
56 unzip them, and with a few simple <a href="#Installation">installation</a> steps get
57 to using HTML Purifier right away:
58 </p>
60 <ul>
61 <li><a class="download" href="&url.dl;.tar.gz">HTML Purifier &htmlpurifier.current.version; (.tar.gz)</a> [<a href="&url.dl;.tar.gz.sig">sig</a>]</li>
62 <li><a class="download" href="&url.dl;.zip" >HTML Purifier &htmlpurifier.current.version; (.zip)</a> [<a href="&url.dl;.zip.sig">sig</a>]</li>
63 </ul>
65 <h3 id="Lite">Lite Distribution</h3>
67 <p>
68 No, it's not magically faster. HTML Purifier Lite offers the same
69 functionality of HTML Purifier (standard), except that anything not
70 essentially to the basic functioning of the library has been stripped
71 out: end-user documentation, unit-tests, profiling, maintenance scripts, etc.
72 Just the <code>library</code> folder.
73 </p>
75 <ul>
76 <li><a class="download" href="&url.dl;-lite.tar.gz">HTML Purifier &htmlpurifier.current.version; Lite (.tar.gz)</a> [<a href="&url.dl;-lite.tar.gz.sig">sig</a>]</li>
77 <li><a class="download" href="&url.dl;-lite.zip" >HTML Purifier &htmlpurifier.current.version; Lite (.zip)</a> [<a href="&url.dl;-lite.zip.sig">sig</a>]</li>
78 </ul>
80 <h3 id="Standalone">Standalone Distribution</h3>
82 <p>
83 For those of you who balk at the possibility of a 100+ includes, we also
84 offer a conveniently packaged single-file version of HTML Purifier. Well,
85 not really, since HTML Purifier does require some auxiliary files in
86 order to work (but they are neatly tucked away in a folder named
87 <code>standalone</code>). Include <code>HTMLPurifier.standalone.php</code>
88 and be done with it!
89 </p>
91 <ul>
92 <li><a class="download" href="&url.dl;-standalone.tar.gz">HTML Purifier &htmlpurifier.current.version; Standalone (.tar.gz)</a> [<a href="&url.dl;-standalone.tar.gz.sig">sig</a>]</li>
93 <li><a class="download" href="&url.dl;-standalone.zip" >HTML Purifier &htmlpurifier.current.version; Standalone (.zip)</a> [<a href="&url.dl;-standalone.zip.sig">sig</a>]</li>
94 </ul>
96 <h3 id="SHA1"><acronym>SHA-1</acronym> checksums</h3>
98 <p>
99 Here are the <acronym>SHA-1</acronym> checksums you can use to
100 verify the integrity of your HTML Purifier download:
101 </p>
103 <pre class="long">&htmlpurifier.current.hashes;</pre>
105 <h3 id="GnuPG">GnuPG signatures</h3>
108 There are <tt>.sig</tt> files which you can use to cryptographically verify
109 that the release is from me, Edward Z. Yang. You can find
110 my <a href="http://www.thewritingpot.com/gpgpubkey.asc">public key
111 here (0x869C48DA)</a>. My key's fingerprint is:
112 <tt>3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA</tt>.
113 </p>
115 <p>Verify files with this command:</p>
117 <pre class="command">gpg --verify <strong>$filename</strong>.sig</pre>
119 <p>Future releases will be signed with my new <a href="ezyang-tablet.asc">ezyang@mit.edu</a>
120 key. This key is signed by my old key, and you can retrieve the signature
121 from <a href="http://pgp.mit.edu:11371/pks/lookup?op=vindex&amp;search=0x4B3B9E321E1C674B">pgp.mit.edu</a>.</p>
123 <h2 id="PEAR"><acronym>PEAR</acronym></h2>
126 HTML Purifier is also available via a <acronym>PEAR</acronym> channel.
127 The <acronym>PEAR</acronym> installer is an incredibly powerful and robust
128 way to install <abbr>PHP</abbr> packages, and
129 does not have to be limited to packages found on
130 <a href="http://pear.php.net/">pear.php.net</a>. With
131 <acronym>PEAR</acronym>, installing is as simple as these
132 two commands in your shell:
133 </p>
135 <pre class="command">pear channel-discover htmlpurifier.org
136 pear install hp/HTMLPurifier</pre>
139 ...and then following the <a href="#Installation">installation instructions</a>.
140 </p>
143 You can upgrade with:
144 </p>
146 <pre class="command">pear upgrade hp/HTMLPurifier</pre>
148 <h2 id="Composer">Composer</h2>
151 HTML Purifier is available via <a href="https://getcomposer.org/">Composer</a>,
152 just run:
153 </p>
155 <pre class="command">composer require ezyang/htmlpurifier</pre>
157 <h2 id="Git">Git</h2>
160 For those who like to live on the edge, you can also grab the latest
161 developmental code from our Git
162 repository. Simply execute this command in your shell:
163 </p>
165 <pre class="command">git clone git://repo.or.cz/htmlpurifier.git</pre>
168 You must have Git installed. Windows users can grab a copy of Git via the
169 <a href="http://code.google.com/p/msysgit/">msysgit project</a>.
170 </p>
173 Code in master is quite stable;
174 a combination of extensive unit-testing and atomic commits means that
175 the most recent version will almost never be broken.
176 </p>
179 Online repository browsing and mirroring services (click links to get
180 pull URLs) are available at numerous places:
181 </p>
183 <ul>
184 <li><strong><a href="http://repo.or.cz/w/htmlpurifier.git">repo.or.cz</a></strong> -
185 Master repository: prefer pulling from it, always push to it. Make this your
186 <code>origin</code> remote if it isn't already.
187 <a href="http://repo.or.cz/m/regproj.cgi?name=htmlpurifier/">Allows forks</a>,
188 please use them!</li>
189 <li><a href="http://gitorious.org/projects/htmlpurifier">Gitorious</a> -
190 Regular old mirror. Allows forks, but don't use them.</li>
191 <li><a href="http://github.com/ezyang/htmlpurifier/tree/master">GitHub</a> -
192 Regular old mirror, but with <a href="http://github.com/ezyang/htmlpurifier/network">pretty
193 history visualization tools</a>. Allows forks, but don't use them.</li>
194 </ul>
196 <h2 id="Installation">Installation</h2>
198 <h3>File permissions</h3>
201 HTML Purifier will write
202 out cache files for HTMLDefinition in the subdirectories of
203 <code>HTMLPurifier/DefinitionCache/Serializer</code>. If you are in
204 the <code>library/</code> folder of HTML Purifier, you can set the
205 appropriate permissions using:
206 </p>
208 <pre class="command">chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer</pre>
211 If the above command doesn't work, you may need to assign write permissions
212 to all. This may be necessary if your webserver runs as nobody, but is
213 not recommended since it means any other user can write files in the
214 directory. Use:
215 </p>
217 <pre class="command">chmod -R 0777 HTMLPurifier/DefinitionCache/Serializer</pre>
220 You can also chmod files via your <abbr>FTP</abbr> client; this option
221 is usually accessible by right clicking the corresponding directory and
222 then selecting <q>chmod</q> or <q>file permissions</q>.
223 </p>
226 If you are unable or unwilling to give write permissions to the cache
227 directory, you can either disable the cache (and suffer a performance
228 hit):
229 </p>
231 <pre>$config-&gt;set('Core', 'DefinitionCache', null);</pre>
234 Or move the cache directory somewhere else (no trailing slash):
235 </p>
237 <pre>$config-&gt;set('Cache', 'SerializerPath', '/home/user/absolute/path');</pre>
239 <h3>Quick install</h3>
241 <p>If your website is in UTF-8 and XHTML Transitional, use this code:</p>
243 <pre>&lt;?php
244 require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';
246 $purifier = new HTMLPurifier();
247 $clean_html = $purifier-&gt;purify($dirty_html);
248 ?&gt;</pre>
250 <p>If your website is in a different encoding or doctype, use this code:</p>
252 <pre>&lt;?php
253 require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';
255 $config = HTMLPurifier_Config::createDefault();
256 $config-&gt;set('Core', 'Encoding', <strong>'ISO-8859-1'</strong>); // replace with your encoding
257 $config-&gt;set('HTML', 'Doctype', <strong>'HTML 4.01 Transitional'</strong>); // replace with your doctype
258 $purifier = new HTMLPurifier($config);
260 $clean_html = $purifier-&gt;purify($dirty_html);
261 ?&gt;</pre>
264 People with HTML Purifier already in their path (<acronym>PEAR</acronym>,
265 for example) can use:
266 </p>
268 <pre>require_once 'HTMLPurifier.auto.php';</pre>
271 For detailed installation instructions, read the
272 <a href="http://repo.or.cz/w/htmlpurifier.git?a=blob;f=INSTALL;hb=v&htmlpurifier.current.version;"><code>INSTALL</code></a>
273 document.
274 </p>
276 <h2 id="MailingList">Mailing list</h2>
279 You can be notified of new releases by a low-traffic announce list. Subscribe
280 <a href="https://mailman.mit.edu/mailman/listinfo/htmlpurifier">at the mailman page</a>.
281 We take your privacy very seriously and will not use emails submitted
282 to this web form for any other purposes.
283 </p>
286 You can also subscribe to a moderately higher traffic, unmoderated
287 mailing list intended for development discussion and user support
288 at <a href="http://groups.google.com/group/htmlpurifier">Google Groups</a>.
289 </p>
291 <h2 id="History">History</h2>
294 Previous releases can be obtained by browsing
295 the <a href="releases/">release directory</a>
296 or checking code out of the
297 <a href="http://htmlpurifier.org/svnroot/htmlpurifier/tags/">tags/
298 directory</a>. However, they are not supported and should not be used
299 in live environments. If you are having trouble upgrading, pop over
300 to <a href="http://htmlpurifier.org/phorum/">the forums</a> and get help.
301 </p>
303 </div>
304 </div>
306 </body>
307 </html>