Skip to content

Commit

Permalink
Update INSTALL to avoid missing config snafu, update usage.xml.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
  • Loading branch information
ezyang committed Aug 24, 2011
1 parent 820d6e9 commit 856a5e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions INSTALL
Expand Up @@ -331,11 +331,6 @@ Or move the cache directory somewhere else (no trailing slash):

The interface is mind-numbingly simple:

$purifier = new HTMLPurifier();
$clean_html = $purifier->purify( $dirty_html );

...or, if you're using the configuration object:

$purifier = new HTMLPurifier($config);
$clean_html = $purifier->purify( $dirty_html );

Expand All @@ -354,7 +349,8 @@ If your website is in UTF-8 and XHTML Transitional, use this code:
<?php
require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';

$purifier = new HTMLPurifier();
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$clean_html = $purifier->purify($dirty_html);
?>

Expand Down
2 changes: 1 addition & 1 deletion configdoc/usage.xml
Expand Up @@ -260,7 +260,7 @@
<line>64</line>
</file>
<file name="HTMLPurifier/URIScheme.php">
<line>75</line>
<line>81</line>
</file>
</directive>
<directive id="URI.Base">
Expand Down

0 comments on commit 856a5e5

Please sign in to comment.