mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-20 21:01:39 +02:00
Merge in r649-656, prompted by changing two of Encoder's functions to static.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/strict@657 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
40
smoketests/all.php
Normal file
40
smoketests/all.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
require_once 'common.php';
|
||||
|
||||
header('Content-type: text/html; charset=UTF-8');
|
||||
echo '<?xml version="1.0" encoding="UTF-8" ?>';
|
||||
|
||||
?><!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>HTML Purifier: All Smoketests</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<style type="text/css">
|
||||
#content {margin:5em;}
|
||||
iframe {width:100%;height:30em;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML Purifier: All Smoketests</h1>
|
||||
<div id="content">
|
||||
<?php
|
||||
|
||||
$dir = './';
|
||||
$dh = opendir($dir);
|
||||
while (false !== ($filename = readdir($dh))) {
|
||||
if ($filename[0] == '.') continue;
|
||||
if (strpos($filename, '.php') === false) continue;
|
||||
if ($filename == 'common.php') continue;
|
||||
if ($filename == 'all.php') continue;
|
||||
?>
|
||||
<iframe src="<?php echo escapeHTML($filename); ?>"></iframe>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -11,4 +11,4 @@ function escapeHTML($string) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -46,6 +46,7 @@ echo '<?xml version="1.0" encoding="UTF-8" ?>';
|
||||
.HTMLPurifier_Printer caption {font-size:1.5em; font-weight:bold;
|
||||
width:100%;}
|
||||
.HTMLPurifier_Printer .heavy {background:#99C;text-align:center;}
|
||||
dt {font-weight:bold;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function toggleWriteability(id_of_patient, checked) {
|
||||
@@ -97,13 +98,14 @@ transformation into a real array list or a lookup table).</p>
|
||||
<label for="<?php echo $directive; ?>">%<?php echo $directive; ?></label>
|
||||
</a>
|
||||
</th>
|
||||
<td>
|
||||
<?php if (is_bool($value)) { ?>
|
||||
<td id="<?php echo $directive; ?>">
|
||||
<label for="Yes_<?php echo $directive; ?>"><span class="c">%<?php echo $directive; ?>:</span> Yes</label>
|
||||
<input type="radio" name="<?php echo $directive; ?>" id="Yes_<?php echo $directive; ?>" value="1"<?php if ($value) { ?> checked="checked"<?php } ?> />
|
||||
<label for="No_<?php echo $directive; ?>"><span class="c">%<?php echo $directive; ?>:</span> No</label>
|
||||
<input type="radio" name="<?php echo $directive; ?>" id="No_<?php echo $directive; ?>" value="0"<?php if (!$value) { ?> checked="checked"<?php } ?> />
|
||||
<?php } else { ?>
|
||||
<td>
|
||||
<?php if($allow_null) { ?>
|
||||
<label for="Null_<?php echo $directive; ?>"><span class="c">%<?php echo $directive; ?>:</span> Null/Disabled*</label>
|
||||
<input
|
||||
@@ -140,6 +142,40 @@ variable and a null variable. A whitelist, for example, will take an
|
||||
empty array as meaning <em>no</em> allowed elements, while checking
|
||||
Null/Disabled will mean that user whitelisting functionality is disabled.</p>
|
||||
</form>
|
||||
|
||||
<h2>Definitions</h2>
|
||||
|
||||
<dl>
|
||||
<dt>Parent of Fragment</dt>
|
||||
<dd>HTML that HTML Purifier does not live in a void: when it's
|
||||
output, it has to be placed in another element by means of
|
||||
something like <code><element> <?php echo $html
|
||||
?> </element></code>. The parent in this example
|
||||
is <code>element</code>.</dd>
|
||||
<dt>Strict mode</dt>
|
||||
<dd>Whether or not HTML Purifier's output is Transitional or
|
||||
Strict compliant. Non-strict mode still actually a little strict
|
||||
and converts many deprecated elements.</dd>
|
||||
<dt>#PCDATA</dt>
|
||||
<dd>Literally <strong>Parsed Character Data</strong>, it is regular
|
||||
text. Tags like <code>ul</code> don't allow text in them, so
|
||||
#PCDATA is missing.</dd>
|
||||
<dt>Tag transform</dt>
|
||||
<dd>A tag transform will change one tag to another. Example: <code>font</code>
|
||||
turns into a <code>span</code> tag with appropriate CSS.</dd>
|
||||
<dt>Attr Transform</dt>
|
||||
<dd>An attribute transform changes a group of attributes based on one
|
||||
another. Currently, only <code>lang</code> and <code>xml:lang</code>
|
||||
use this hook, to synchronize each other's values. Pre/Post indicates
|
||||
whether or not the transform is done before/after validation.</dd>
|
||||
<dt>Excludes</dt>
|
||||
<dd>Tags that an element excludes are excluded for all descendants of
|
||||
that element, and not just the children of them.</dd>
|
||||
<dt>Name(Param1, Param2)</dt>
|
||||
<dd>Represents an internal data-structure. You'll have to check out
|
||||
the corresponding classes in HTML Purifier to find out more.</dd>
|
||||
</dl>
|
||||
|
||||
<h2>HTMLDefinition</h2>
|
||||
<?php echo $printer_html_definition->render($config) ?>
|
||||
<h2>CSSDefinition</h2>
|
||||
|
Reference in New Issue
Block a user