Skip to content

Commit

Permalink
Miscellaneous documentation updates.
Browse files Browse the repository at this point in the history
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1649 48356398-32a2-884e-a903-53898d9a118a
  • Loading branch information
Edward Z. Yang committed Apr 4, 2008
1 parent d467af6 commit c216968
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
5 changes: 5 additions & 0 deletions docs/dev-advanced-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ <h1>Advanced API</h1>
<div id="index">Return to the <a href="index.html">index</a>.</div>
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>

<p>
<strong>Warning:</strong> This document may be out-of-date. When in doubt,
consult the source code documentation.
</p>

<p>HTML Purifier currently natively supports only a subset of HTML's
allowed elements, attributes, and behavior; specifically, this subset
is the set of elements that are safe for untrusted users to use.
Expand Down
1 change: 0 additions & 1 deletion docs/dev-code-quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ a lot of strtolower() calls, no legit casing
URI - multiple regular expressions; missing validation for parts (?)
CSS - parser doesn't accept advanced CSS (fringe)
Number - constructor interface inconsistent with Integer
ConfigSchema - redefinition is a mess
Strategy
FixNesting - cannot bubble nodes out of structures, duplicated checks
for special-case parent node
Expand Down
1 change: 0 additions & 1 deletion docs/dev-optimization.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ <h1>Optimization</h1>
<ul>
<li>Make Tokens Flyweights (may prove problematic, probably not worth it)</li>
<li>Rewrite regexps into PHP code</li>
<li>Serialize the Definition object</li>
<li>Batch regexp validation (do as many per function call as possible)</li>
<li>Parallelize strategies</li>
</ul>
Expand Down
9 changes: 7 additions & 2 deletions docs/dev-progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ <h1>Implementation Progress</h1>
<div id="index">Return to the <a href="index.html">index</a>.</div>
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>

<p>
<strong>Warning:</strong> This table is kept for historical purposes and
is not being actively updated.
</p>

<h2>Key</h2>

<table cellspacing="0"><tbody>
Expand Down Expand Up @@ -148,7 +153,7 @@ <h2>CSS</h2>
Depends on background-image</td></tr>
<tr class="css1 impl-yes"><td>background-position</td><td>Depends on background-image</td></tr>
<tr class="danger impl-no"><td>cursor</td><td>Dangerous but fluffy</td></tr>
<tr class="danger css1"><td>display</td><td>ENUM(...), Dangerous but interesting;
<tr class="danger impl-yes"><td>display</td><td>ENUM(...), Dangerous but interesting;
will not implement list-item, run-in (Opera only) or table (no IE);
inline-block has incomplete IE6 support and requires -moz-inline-box
for Mozilla. Unknown target milestone.</td></tr>
Expand All @@ -167,7 +172,7 @@ <h2>CSS</h2>
Mostly supported. Unknown target milestone.</td></tr>
<tr><td>page-break-inside</td><td>ENUM(avoid, auto), Opera only. Unknown target milestone.</td></tr>
<tr class="impl-no"><td>quotes</td><td>May be dropped from CSS2, fairly useless for inline context</td></tr>
<tr class="impl-no"><td>visibility</td><td>ENUM(visible, hidden, collapse),
<tr class="danger impl-yes"><td>visibility</td><td>ENUM(visible, hidden, collapse),
Dangerous</td></tr>
<tr class="css1 feature impl-partial"><td>white-space</td><td>ENUM(normal, pre, nowrap, pre-wrap,
pre-line), Spotty implementation:
Expand Down
22 changes: 11 additions & 11 deletions docs/enduser-uri-filter.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ <h2>Creating the class</h2>

<pre>class HTMLPurifier_URIFilter_<strong>NameOfFilter</strong> extends HTMLPurifier_URIFilter
{
var $name = '<strong>NameOfFilter</strong>';
function prepare($config) {}
function filter(&$uri, $config, &$context) {}
public $name = '<strong>NameOfFilter</strong>';
public function prepare($config) {}
public function filter(&$uri, $config, &$context) {}
}</pre>

<p>
Expand All @@ -56,12 +56,12 @@ <h2>Creating the class</h2>

<pre>class HTMLPurifier_URI
{
var $scheme, $userinfo, $host, $port, $path, $query, $fragment;
function HTMLPurifier_URI($scheme, $userinfo, $host, $port, $path, $query, $fragment);
function toString();
function copy();
function getSchemeObj($config, &$context);
function validate($config, &$context);
public $scheme, $userinfo, $host, $port, $path, $query, $fragment;
public function HTMLPurifier_URI($scheme, $userinfo, $host, $port, $path, $query, $fragment);
public function toString();
public function copy();
public function getSchemeObj($config, &$context);
public function validate($config, &$context);
}</pre>

<p>
Expand Down Expand Up @@ -138,8 +138,8 @@ <h2>Return value: Boolean, not URI</h2>

<pre>class HTMLPurifier_URIFilter_ConvertIDNToPunycode extends HTMLPurifier_URIFilter
{
var $name = 'ConvertIDNToPunycode';
function filter(&$uri, $config, &$context) {
public $name = 'ConvertIDNToPunycode';
public function filter(&$uri, $config, &$context) {
if (is_null($uri->host)) return true;
if ($uri->host == utf8_decode($uri->host)) {
// is ASCII, abort
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2>Internal memos</h2>

<tr>
<td>Development</td>
<td><a href="enduser-code-quality.txt">Code Quality Issues</a></td>
<td><a href="dev-code-quality.txt">Code Quality Issues</a></td>
<td>Enumerates code quality issues and places that need to be refactored.</td>
</tr>

Expand Down
3 changes: 0 additions & 3 deletions docs/ref-html-modularization.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

The Modularization of HTMLDefinition in HTML Purifier

Todo for XHTML 1.1 support <http://www.w3.org/TR/xhtml11/changes.html>
1. Support Ruby <http://www.w3.org/TR/2001/REC-ruby-20010531/>

HTML Purifier uses the modularization of XHTML
<http://www.w3.org/TR/xhtml-modularization/> to organize the internals
of HTMLDefinition into a more manageable and extensible fashion. Rather
Expand Down

0 comments on commit c216968

Please sign in to comment.