0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-09 15:28:40 +00:00

Remove trailing ?> in PHP library files, add trailing newlines to all other files.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1253 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2007-06-27 13:58:32 +00:00
parent 1e2abb7f8f
commit e99520ab96
320 changed files with 91 additions and 330 deletions

54
INSTALL
View File

@ -48,7 +48,7 @@ be standards compliant. HTML Purifier can deal with these doctypes:
* XHTML 1.0 Strict
* HTML 4.01 Transitional
* HTML 4.01 Strict
* XHTML 1.1 sans Ruby
* XHTML 1.1 (sans Ruby)
...and these character encodings:
@ -112,8 +112,9 @@ websites):
Note that HTML Purifier's support for non-Unicode encodings is crippled by the
fact that any character not supported by that encoding will be silently
dropped, EVEN if it is ampersand escaped. If you want to work around
this, you are welcome to read docs/enduser-utf8.html for a workaround,
but please be cognizant of the issues the "solution" creates.
this, you are welcome to read docs/enduser-utf8.html for a fix,
but please be cognizant of the issues the "solution" creates (for this
reason, I do not include the solution in this document).
@ -139,7 +140,9 @@ Other supported doctypes include:
There are more configuration directives which can be read about
here: <http://htmlpurifier.org/live/configdoc/plain.html> They're a bit boring,
but they can help out for those of you who like to exert maximum control over
your code.
your code. Some of the more interesting ones are configurable at the
demo <http://htmlpurifier.org/demo.php> and are well worth looking into
for your own system.
@ -156,13 +159,15 @@ The interface is mind-numbingly simple:
$clean_html = $purifier->purify( $dirty_html );
That's it! For more examples, check out docs/examples/ (they aren't very
different though). Also, SLOW gives advice on what to do if HTML Purifier
is slowing down your application.
different though). Also, docs/enduser-slow.html gives advice on what to
do if HTML Purifier is slowing down your application.
6. Quick install
First, make sure library/HTMLPurifier/DefinitionCache/Serializer is
writable by the webserver (see Section 7: Caching below for details).
If your website is in UTF-8 and XHTML Transitional, use this code:
<?php
@ -189,6 +194,37 @@ If your website is in a different encoding or doctype, use this code:
7. Caching
HTML Purifier generates some cache files to speed up its execution. For
maximum performance, make sure that library/HTMLPurifier/DefinitionCache/Serializer
is writeable by the webserver.
HTML Purifier generates some cache files (generally one or two) to speed up
its execution. For maximum performance, make sure that
library/HTMLPurifier/DefinitionCache/Serializer is writeable by the webserver.
If you are in the library/ folder of HTML Purifier, you can set the
appropriate permissions using:
chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer
If the above command doesn't work, you may need to assign write permissions
to all. This may be necessary if your webserver runs as nobody, but is
not recommended since it means any other user can write files in the
directory. Use:
chmod -R 0777 HTMLPurifier/DefinitionCache/Serializer
You can also chmod files via your FTP client; this option
is usually accessible by right clicking the corresponding directory and
then selecting "chmod" or "file permissions".
Starting with 2.0.1, HTML Purifier will generate friendly error messages
that will tell you exactly what you have to chmod the directory to, if in doubt,
follow its advice.
If you are unable or unwilling to give write permissions to the cache
directory, you can either disable the cache (and suffer a performance
hit):
$config->set('Core', 'DefinitionCache', null);
Or move the cache directory somewhere else (no trailing slash):
$config->set('Cache', 'SerializerPath', '/home/user/absolute/path');

View File

@ -165,4 +165,4 @@ echo '<div>Random input was: ' .
?>
</body></html>
</body></html>

View File

@ -15,5 +15,3 @@ $context = new HTMLPurifier_Context();
for ($i = 0; $i < 10; $i++) {
$tokens = $lexer->tokenizeHTML($input, $config, $context);
}
?>

View File

@ -41,4 +41,3 @@ if (php_sapi_name() != 'cli') {
echo 'Files generated successfully.';
}
?>

View File

@ -7,4 +7,3 @@
set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() );
require_once 'ConfigDoc.php';
?>

View File

@ -36,4 +36,3 @@ class ConfigDoc
}
?>

View File

@ -60,4 +60,3 @@ class ConfigDoc_HTMLXSLTProcessor
}
?>

View File

@ -23,4 +23,3 @@ class ConfigDoc_XMLSerializer
}
?>

View File

@ -121,4 +121,3 @@ class ConfigDoc_XMLSerializer_ConfigSchema extends ConfigDoc_XMLSerializer
}
?>

View File

@ -24,4 +24,3 @@ class ConfigDoc_XMLSerializer_Types extends ConfigDoc_XMLSerializer
}
?>

View File

@ -148,4 +148,4 @@
</tr>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>

View File

@ -210,4 +210,4 @@ the usual things required are:</p>
<div id="version">$Id$</div>
</body></html>
</body></html>

View File

@ -79,4 +79,4 @@ help you find the correct functionality more quickly. Here they are:</p>
<div id="version">$Id$</div>
</body></html>
</body></html>

View File

@ -30,4 +30,4 @@ that itch, put it here!</p>
<div id="version">$Id$</div>
</body></html>
</body></html>

View File

@ -299,4 +299,4 @@ Mozilla on inside and needs -moz-outline, no IE support.</td></tr>
<div id="version">$Id$</div>
</body></html>
</body></html>

View File

@ -783,4 +783,4 @@ $form->excludes = array('form' => true);</strong></pre>
<div id="version">$Id: enduser-tidy.html 1158 2007-06-18 19:26:29Z Edward $</div>
</body></html>
</body></html>

View File

@ -144,4 +144,4 @@ anchors is beyond me.</p>
<div id="version">$Id$</div>
</body>
</html>
</html>

View File

@ -114,4 +114,4 @@ if you decide to do that! Especially if you port HTML Purifier to C++.
<tt>;-)</tt></p>
</body>
</html>
</html>

View File

@ -227,4 +227,4 @@ effectively in the background.</p>
<div id="version">$Id$</div>
</body></html>
</body></html>

View File

@ -1043,4 +1043,4 @@ a more in-depth look into character sets and encodings.</p>
</ul>
</body>
</html>
</html>

View File

@ -149,4 +149,4 @@ like that, for that matter), send it over and it might get included
with the core!</p>
</body>
</html>
</html>

View File

@ -20,4 +20,3 @@ $pure_html = $purifier->purify($html);
echo '<pre>' . htmlspecialchars($pure_html) . '</pre>';
?>

View File

@ -162,4 +162,4 @@ the code. They may be upgraded to HTML files or stay as TXT scratchpads.</p>
<div id="version">$Id$</div>
</body>
</html>
</html>

View File

@ -42,4 +42,4 @@ the development of this library in these forum threads:</p>
<div id="version">$Id$</div>
</body>
</html>
</html>

View File

@ -21,4 +21,4 @@ HTML Purifier context.
<xmp>, monospace, replace with pre
These should be put into their own Tidy module, not loaded by default(?). These
all qualify as "lenient" transforms.
all qualify as "lenient" transforms.

View File

@ -7,4 +7,3 @@
set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() );
require_once 'HTMLPurifier.php';
?>

View File

@ -18,4 +18,3 @@ function HTMLPurifier($html, $config = null) {
return $purifier->purify($html, $config);
}
?>

View File

@ -213,4 +213,3 @@ class HTMLPurifier
}
?>

View File

@ -127,4 +127,3 @@ class HTMLPurifier_AttrCollections
}
?>

View File

@ -84,4 +84,3 @@ class HTMLPurifier_AttrDef
}
?>

View File

@ -66,4 +66,3 @@ class HTMLPurifier_AttrDef_CSS extends HTMLPurifier_AttrDef
}
?>

View File

@ -84,4 +84,3 @@ class HTMLPurifier_AttrDef_CSS_Background extends HTMLPurifier_AttrDef
}
?>

View File

@ -127,4 +127,3 @@ class HTMLPurifier_AttrDef_CSS_BackgroundPosition extends HTMLPurifier_AttrDef
}
?>

View File

@ -42,4 +42,3 @@ class HTMLPurifier_AttrDef_CSS_Border extends HTMLPurifier_AttrDef
}
?>

View File

@ -98,4 +98,3 @@ class HTMLPurifier_AttrDef_CSS_Color extends HTMLPurifier_AttrDef
}
?>

View File

@ -35,4 +35,3 @@ class HTMLPurifier_AttrDef_CSS_Composite extends HTMLPurifier_AttrDef
}
?>

View File

@ -148,4 +148,3 @@ class HTMLPurifier_AttrDef_CSS_Font extends HTMLPurifier_AttrDef
}
?>

View File

@ -59,4 +59,3 @@ class HTMLPurifier_AttrDef_CSS_FontFamily extends HTMLPurifier_AttrDef
}
?>

View File

@ -53,4 +53,3 @@ class HTMLPurifier_AttrDef_CSS_Length extends HTMLPurifier_AttrDef
}
?>

View File

@ -77,4 +77,3 @@ class HTMLPurifier_AttrDef_CSS_ListStyle extends HTMLPurifier_AttrDef
}
?>

View File

@ -55,4 +55,3 @@ class HTMLPurifier_AttrDef_CSS_Multiple extends HTMLPurifier_AttrDef
}
?>

View File

@ -58,4 +58,3 @@ class HTMLPurifier_AttrDef_CSS_Number extends HTMLPurifier_AttrDef
}
?>

View File

@ -40,4 +40,3 @@ class HTMLPurifier_AttrDef_CSS_Percentage extends HTMLPurifier_AttrDef
}
?>

View File

@ -34,4 +34,3 @@ class HTMLPurifier_AttrDef_CSS_TextDecoration extends HTMLPurifier_AttrDef
}
?>

View File

@ -55,4 +55,3 @@ class HTMLPurifier_AttrDef_CSS_URI extends HTMLPurifier_AttrDef_URI
}
?>

View File

@ -63,4 +63,3 @@ class HTMLPurifier_AttrDef_Enum extends HTMLPurifier_AttrDef
}
?>

View File

@ -27,4 +27,3 @@ class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
}
?>

View File

@ -32,4 +32,3 @@ class HTMLPurifier_AttrDef_HTML_Color extends HTMLPurifier_AttrDef
}
?>

View File

@ -31,4 +31,3 @@ class HTMLPurifier_AttrDef_HTML_FrameTarget extends HTMLPurifier_AttrDef_Enum
}
?>

View File

@ -118,4 +118,3 @@ class HTMLPurifier_AttrDef_HTML_ID extends HTMLPurifier_AttrDef
}
?>

View File

@ -41,4 +41,3 @@ class HTMLPurifier_AttrDef_HTML_Length extends HTMLPurifier_AttrDef_HTML_Pixels
}
?>

View File

@ -70,4 +70,3 @@ class HTMLPurifier_AttrDef_HTML_LinkTypes extends HTMLPurifier_AttrDef
}
?>

View File

@ -41,4 +41,3 @@ class HTMLPurifier_AttrDef_HTML_MultiLength extends HTMLPurifier_AttrDef_HTML_Le
}
?>

View File

@ -48,4 +48,3 @@ class HTMLPurifier_AttrDef_HTML_Nmtokens extends HTMLPurifier_AttrDef
}
?>

View File

@ -34,4 +34,3 @@ class HTMLPurifier_AttrDef_HTML_Pixels extends HTMLPurifier_AttrDef
}
?>

View File

@ -72,4 +72,3 @@ class HTMLPurifier_AttrDef_Integer extends HTMLPurifier_AttrDef
}
?>

View File

@ -72,4 +72,3 @@ class HTMLPurifier_AttrDef_Lang extends HTMLPurifier_AttrDef
}
?>

View File

@ -14,4 +14,3 @@ class HTMLPurifier_AttrDef_Text extends HTMLPurifier_AttrDef
}
?>

View File

@ -302,4 +302,4 @@ class HTMLPurifier_AttrDef_URI extends HTMLPurifier_AttrDef
}
?>

View File

@ -14,4 +14,3 @@ class HTMLPurifier_AttrDef_URI_Email extends HTMLPurifier_AttrDef
}
?>

View File

@ -20,4 +20,3 @@ class HTMLPurifier_AttrDef_URI_Email_SimpleCheck extends HTMLPurifier_AttrDef_UR
}
?>

View File

@ -51,4 +51,3 @@ class HTMLPurifier_AttrDef_URI_Host extends HTMLPurifier_AttrDef
}
?>

View File

@ -39,4 +39,3 @@ class HTMLPurifier_AttrDef_URI_IPv4 extends HTMLPurifier_AttrDef
}
?>

View File

@ -98,4 +98,3 @@ class HTMLPurifier_AttrDef_URI_IPv6 extends HTMLPurifier_AttrDef_URI_IPv4
}
?>

View File

@ -55,4 +55,3 @@ class HTMLPurifier_AttrTransform
}
?>

View File

@ -28,4 +28,3 @@ class HTMLPurifier_AttrTransform_BdoDir extends HTMLPurifier_AttrTransform
}
?>

View File

@ -23,4 +23,3 @@ extends HTMLPurifier_AttrTransform {
}
?>

View File

@ -36,4 +36,3 @@ extends HTMLPurifier_AttrTransform {
}
?>

View File

@ -17,4 +17,3 @@ class HTMLPurifier_AttrTransform_Border extends HTMLPurifier_AttrTransform {
}
?>

View File

@ -57,4 +57,3 @@ class HTMLPurifier_AttrTransform_EnumToCSS extends HTMLPurifier_AttrTransform {
}
?>

View File

@ -51,4 +51,3 @@ class HTMLPurifier_AttrTransform_ImgRequired extends HTMLPurifier_AttrTransform
}
?>

View File

@ -44,4 +44,3 @@ extends HTMLPurifier_AttrTransform {
}
?>

View File

@ -27,4 +27,3 @@ class HTMLPurifier_AttrTransform_Lang extends HTMLPurifier_AttrTransform
}
?>

View File

@ -26,4 +26,3 @@ class HTMLPurifier_AttrTransform_Length extends HTMLPurifier_AttrTransform
}
?>

View File

@ -18,4 +18,3 @@ class HTMLPurifier_AttrTransform_Name extends HTMLPurifier_AttrTransform
}
?>

View File

@ -79,4 +79,4 @@ class HTMLPurifier_AttrTypes
}
}
?>

View File

@ -137,4 +137,3 @@ class HTMLPurifier_AttrValidator
}
?>

View File

@ -226,4 +226,3 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition
}
?>

View File

@ -57,4 +57,4 @@ class HTMLPurifier_ChildDef
}
}
?>

View File

@ -49,4 +49,3 @@ class HTMLPurifier_ChildDef_Chameleon extends HTMLPurifier_ChildDef
}
}
?>

View File

@ -91,4 +91,3 @@ class HTMLPurifier_ChildDef_Custom extends HTMLPurifier_ChildDef
}
}
?>

View File

@ -19,4 +19,3 @@ class HTMLPurifier_ChildDef_Empty extends HTMLPurifier_ChildDef
}
}
?>

View File

@ -20,4 +20,3 @@ class HTMLPurifier_ChildDef_Optional extends HTMLPurifier_ChildDef_Required
}
}
?>

View File

@ -109,4 +109,3 @@ class HTMLPurifier_ChildDef_Required extends HTMLPurifier_ChildDef
}
}
?>

View File

@ -73,4 +73,3 @@ extends HTMLPurifier_ChildDef_Required
}
}
?>

View File

@ -141,4 +141,3 @@ class HTMLPurifier_ChildDef_Table extends HTMLPurifier_ChildDef
}
}
?>

View File

@ -455,4 +455,4 @@ class HTMLPurifier_Config
}
?>

View File

@ -7,4 +7,3 @@ class HTMLPurifier_ConfigDef {
var $class = false;
}
?>

View File

@ -77,4 +77,3 @@ class HTMLPurifier_ConfigDef_Directive extends HTMLPurifier_ConfigDef
}
?>

View File

@ -24,4 +24,3 @@ class HTMLPurifier_ConfigDef_DirectiveAlias extends HTMLPurifier_ConfigDef
}
}
?>

View File

@ -20,4 +20,3 @@ class HTMLPurifier_ConfigDef_Namespace extends HTMLPurifier_ConfigDef {
}
?>

View File

@ -404,4 +404,4 @@ class HTMLPurifier_ConfigSchema {
}
}
?>

View File

@ -147,4 +147,3 @@ class HTMLPurifier_ContentSets
}
?>

View File

@ -78,4 +78,3 @@ class HTMLPurifier_Context
}
?>

View File

@ -38,4 +38,3 @@ class HTMLPurifier_Definition
}
?>

View File

@ -126,4 +126,3 @@ class HTMLPurifier_DefinitionCache
}
}
?>

View File

@ -57,4 +57,3 @@ class HTMLPurifier_DefinitionCache_Decorator extends HTMLPurifier_DefinitionCach
}
?>

View File

@ -42,4 +42,3 @@ class HTMLPurifier_DefinitionCache_Decorator_Cleanup extends
}
?>

View File

@ -45,4 +45,3 @@ class HTMLPurifier_DefinitionCache_Decorator_Memory extends
}
?>

View File

@ -44,4 +44,3 @@ class HTMLPurifier_DefinitionCache_Decorator_Template extends
}
?>

Some files were not shown because too many files have changed in this diff Show More