Tone down language against documentation, as per Shiflett and Coates.
[htmlpurifier-web.git] / download.xhtml
blob950210ccbebc4e28879ec6935c72d96760627f6e
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())" />
19 <h1 id="title">Download</h1>
21 <div id="content">
23 <p>
24 The current version of HTML Purifier is
25 <strong>&htmlpurifier.current.version;</strong>, released on
26 &htmlpurifier.current.release-date;, and is compatible with
27 <abbr>PHP</abbr> 5.0.5 and up (all code is <code>E_STRICT</code>
28 compliant). This library is open-source,
29 licensed under the <a href="http://www.gnu.org/licenses/lgpl.html"><abbr>LGPL</abbr>
30 v2.1+</a>. We offer multiple ways of downloading
31 and installing HTML Purifier.
32 </p>
34 <div id="toc" class="floated" />
36 <!--
37 <h2 id="Errata">Errata</h2>
39 <p>
40 Here is a list of known bugs. These issues have all been fixed in the
41 <a href="#NightlyBuilds">trunk</a> unless
42 otherwise noted:
43 </p>
45 <ul>
46 </ul>
47 -->
49 <h2 id="Standard">Standard</h2>
51 <p>
52 We offer the standard zip and tarball downloads. Download them,
53 unzip them, and with a few simple <a href="#Installation">installation</a> steps get
54 to using HTML Purifier right away:
55 </p>
57 <ul>
58 <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>
59 <li><a class="download" href="&url.dl;.zip" >HTML Purifier &htmlpurifier.current.version; (.zip)</a> [<a href="&url.dl;.zip.sig">sig</a>]</li>
60 </ul>
62 <h3 id="Lite">Lite Distribution</h3>
64 <p>
65 No, it's not magically faster. HTML Purifier Lite offers the same
66 functionality of HTML Purifier (standard), except that anything not
67 essentially to the basic functioning of the library has been stripped
68 out: end-user documentation, unit-tests, profiling, maintenance scripts, etc.
69 Just the <code>library</code> folder.
70 </p>
72 <ul>
73 <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>
74 <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>
75 </ul>
77 <h3 id="Standalone">Standalone Distribution</h3>
79 <p>
80 For those of you who balk at the possibility of a 100+ includes, we also
81 offer a conveniently packaged single-file version of HTML Purifier. Well,
82 not really, since HTML Purifier does require some auxiliary files in
83 order to work (but they are neatly tucked away in a folder named
84 <code>standalone</code>). Include <code>HTMLPurifier.standalone.php</code>
85 and be done with it!
86 </p>
88 <ul>
89 <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>
90 <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>
91 </ul>
93 <h3 id="SHA1"><acronym>SHA-1</acronym> checksums</h3>
95 <p>
96 Here are the <acronym>SHA-1</acronym> checksums you can use to
97 verify the integrity of your HTML Purifier download:
98 </p>
100 <pre class="long">&htmlpurifier.current.hashes;</pre>
102 <h3 id="GnuPG">GnuPG signatures</h3>
105 There are <tt>.sig</tt> files which you can use to cryptographically verify
106 that the release is from me, Edward Z. Yang. You can find
107 my <a href="http://www.thewritingpot.com/gpgpubkey.asc">public key
108 here (0x869C48DA)</a>. My key's fingerprint is:
109 <tt>3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA</tt>.
110 </p>
112 <p>Verify files with this command:</p>
114 <pre class="command">gpg --verify <strong>$filename</strong>.sig</pre>
116 <h2 id="PEAR"><acronym>PEAR</acronym></h2>
119 HTML Purifier is also available via a <acronym>PEAR</acronym> channel.
120 The <acronym>PEAR</acronym> installer is an incredibly powerful and robust
121 way to install <abbr>PHP</abbr> packages, and
122 does not have to be limited to packages found on
123 <a href="http://pear.php.net/">pear.php.net</a>. With
124 <acronym>PEAR</acronym>, installing is as simple as these
125 two commands in your shell:
126 </p>
128 <pre class="command">pear channel-discover htmlpurifier.org
129 pear install hp/HTMLPurifier</pre>
132 ...and then following the <a href="#Installation">installation instructions</a>.
133 </p>
136 You can upgrade with:
137 </p>
139 <pre class="command">pear upgrade hp/HTMLPurifier</pre>
141 <h2 id="Git">Git</h2>
144 For those who like to live on the edge, you can also grab the latest
145 developmental code from our Git
146 repository. Simply execute this command in your shell:
147 </p>
149 <pre class="command">git clone git://repo.or.cz/htmlpurifier.git</pre>
152 You must have Git installed. Windows users can grab a copy of Git via the
153 <a href="http://code.google.com/p/msysgit/">msysgit project</a>.
154 </p>
157 Code in the trunk actually tends to be quite stable;
158 a combination of extensive unit-testing and atomic commits means that
159 the most recent version will almost never be broken.
160 </p>
163 Online repository browsing and mirroring services (click links to get
164 pull URLs) are available at numerous places:
165 </p>
167 <ul>
168 <li><strong><a href="http://repo.or.cz/w/htmlpurifier.git">repo.or.cz</a></strong> -
169 Master repository: prefer pulling from it, always push to it. Make this your
170 <code>origin</code> remote if it isn't already.
171 <a href="http://repo.or.cz/m/regproj.cgi?name=htmlpurifier/">Allows forks</a>,
172 please use them!</li>
173 <li><a href="http://gitorious.org/projects/htmlpurifier">Gitorious</a> -
174 Regular old mirror. Allows forks, but don't use them.</li>
175 <li><a href="http://github.com/ezyang/htmlpurifier/tree/master">GitHub</a> -
176 Regular old mirror, but with <a href="http://github.com/ezyang/htmlpurifier/network">pretty
177 history visualization tools</a>. Allows forks, but don't use them.</li>
178 <li><a href="http://git.htmlpurifier.org">git.htmlpurifier.org</a> -
179 Dumb HTTP mirror with no web interface, use as last resort.</li>
180 </ul>
182 <p id="Subversion">
183 For backwards compatibility reasons, the
184 <a href="http://htmlpurifier.org/svnroot/htmlpurifier/trunk">Subversion repository</a>
185 is still available, as well as the <a href="http://htmlpurifier.org/viewvc.cgi/htmlpurifier/trunk/">ViewVC interface</a>.
186 We will also continue to support tags, for projects that use Subversion
187 externals. However, the trunk will not be regularly updated.
188 </p>
190 <h2 id="PHP4">HTML Purifier 2.1 for <abbr>PHP</abbr> 4</h2>
193 <strong>Warning:</strong> The HTML Purifier 2.1 series is retired and
194 will only be receiving major
195 bug and security fixes. However, it is compatible with <abbr>PHP</abbr> 4
196 so if you're stuck on this now officially deprecated version of
197 <abbr>PHP</abbr>, here are the older downloads:
198 </p>
200 <ul>
201 <li><a class="download" href="releases/htmlpurifier-2.1.5.tar.gz">HTML Purifier 2.1.5 (.tar.gz)</a></li>
202 <li><a class="download" href="releases/htmlpurifier-2.1.5.zip">HTML Purifier 2.1.5 (.zip)</a></li>
203 </ul>
205 <!--
206 <h2 id="NightlyBuilds">Nightly Builds</h2>
209 Nightly tarballs of the most recent SVN snapshots are available
210 for those of you who want to live on the edge but never got
211 <code>svn export</code> to work. These builds are <abbr>PHP</abbr>5 only.
212 The build is performed every day at midnight, and is available here:
213 </p>
215 <ul>
216 <li><a class="download" href="http://htmlpurifier.org/releases/htmlpurifier-trunk.tar.gz">HTML Purifier Trunk Snapshot (.tar.gz)</a></li>
217 <li><a class="download" href="http://htmlpurifier.org/releases/htmlpurifier-trunk-lite.tar.gz">HTML Purifier Trunk Snapshot Lite (.tar.gz)</a></li>
218 <li><a class="download" href="http://htmlpurifier.org/releases/htmlpurifier-trunk-standalone.tar.gz">HTML Purifier Trunk Snapshot Standalone (.tar.gz)</a></li>
219 </ul>
222 <strong>Warning:</strong> These builds have not yet been updated to use
223 Git, so they may be slightly out-of-date.
224 </p>
227 <h2 id="Installation">Installation</h2>
229 <h3>File permissions</h3>
232 <strong>Starting with HTML Purifier 2.0.0, it is vital that you set
233 proper directory permissions for where HTML Purifier writes out
234 some temporary files.</strong> Specifically, HTML Purifier will write
235 out cache files for HTMLDefinition in the subdirectories of
236 <code>HTMLPurifier/DefinitionCache/Serializer</code>. If you are in
237 the <code>library/</code> folder of HTML Purifier, you can set the
238 appropriate permissions using:
239 </p>
241 <pre class="command">chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer</pre>
244 If the above command doesn't work, you may need to assign write permissions
245 to all. This may be necessary if your webserver runs as nobody, but is
246 not recommended since it means any other user can write files in the
247 directory. Use:
248 </p>
250 <pre class="command">chmod -R 0777 HTMLPurifier/DefinitionCache/Serializer</pre>
253 You can also chmod files via your <abbr>FTP</abbr> client; this option
254 is usually accessible by right clicking the corresponding directory and
255 then selecting <q>chmod</q> or <q>file permissions</q>.
256 </p>
259 If you are unable or unwilling to give write permissions to the cache
260 directory, you can either disable the cache (and suffer a performance
261 hit):
262 </p>
264 <pre>$config->set('Core', 'DefinitionCache', null);</pre>
267 Or move the cache directory somewhere else (no trailing slash):
268 </p>
270 <pre>$config->set('Cache', 'SerializerPath', '/home/user/absolute/path');</pre>
273 If there is a demand for it, future versions will also support
274 <a href="http://danga.com/memcached/">memcached</a>
275 as a caching system.
276 </p>
278 <h3>Quick install</h3>
280 <p>If your website is in UTF-8 and XHTML Transitional, use this code:</p>
282 <pre>&lt;?php
283 require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';
285 $purifier = new HTMLPurifier();
286 $clean_html = $purifier->purify($dirty_html);
287 ?&gt;</pre>
289 <p>If your website is in a different encoding or doctype, use this code:</p>
291 <pre>&lt;?php
292 require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';
294 $config = HTMLPurifier_Config::createDefault();
295 $config->set('Core', 'Encoding', <strong>'ISO-8859-1'</strong>); // replace with your encoding
296 $config->set('HTML', 'Doctype', <strong>'HTML 4.01 Transitional'</strong>); // replace with your doctype
297 $purifier = new HTMLPurifier($config);
299 $clean_html = $purifier->purify($dirty_html);
300 ?&gt;</pre>
303 People with HTML Purifier already in their path (<acronym>PEAR</acronym>,
304 for example) can use:
305 </p>
307 <pre>require_once 'HTMLPurifier.auto.php';</pre>
310 For detailed installation instructions, read the
311 <a href="http://htmlpurifier.org/svnroot/htmlpurifier/tags/&htmlpurifier.current.version;/INSTALL"><code>INSTALL</code></a>
312 document.
313 </p>
315 <h2 id="MailingList">Mailing list</h2>
318 You can be notified of new releases by a low-traffic announce list. Subscribe
319 here:
320 </p>
322 <form method="post" action="http://scripts.dreamhost.com/add_list.cgi">
323 <div>
324 <label for="name">Name</label>: <input type="text" name="name" id="name" />
325 <label for="email">E-mail</label>: <input type="text" name="email" id="email" />
326 </div>
327 <div>
328 <input type="submit" name="submit" value="Suscribe to Announcement List" />
329 <input type="submit" name="unsub" value="Unsubscribe" />
330 </div>
331 <input type="hidden" name="list" value="admin@htmlpurifier.org" />
332 <input type="hidden" name="domain" value="htmlpurifier.org" />
333 <input type="hidden" name="emailit" value="1" />
334 </form>
337 We take your privacy very seriously and will not use emails submitted
338 to this web form for any other purposes.
339 </p>
341 <h2 id="History">History</h2>
344 Previous releases can be obtained by browsing
345 the <a href="releases/">release directory</a>
346 or checking code out of the
347 <a href="http://htmlpurifier.org/svnroot/htmlpurifier/tags/">tags/
348 directory</a>. However, they are not supported and should not be used
349 in live environments. If you are having trouble upgrading, pop over
350 to <a href="http://htmlpurifier.org/phorum/">the forums</a> and get help.
351 </p>
353 </div>
355 </body>
356 </html>