0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-19 10:45:18 +00:00

- Enable blank params to mean true for booleans again

- Make reporter send val=1 anyway
- Add htmlpurifier.org remote test

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1557 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2008-02-17 01:07:17 +00:00
parent 212958a9c7
commit 51da183f80
3 changed files with 4 additions and 3 deletions

View File

@ -22,7 +22,7 @@ class HTMLPurifier_SimpleTest_Reporter extends HTMLReporter
?>><?php echo $file ?></option>
<?php } ?>
</select>
<input type="checkbox" name="standalone" title="Standalone version?" <?php if($this->ac['standalone']) {echo 'checked="checked" ';} ?>/>
<input type="checkbox" name="standalone" value="1" title="Standalone version?" <?php if($this->ac['standalone']) {echo 'checked="checked" ';} ?>/>
<input type="submit" value="Go">
</form>
<?php

View File

@ -144,7 +144,7 @@ function htmlpurifier_args(&$AC, $aliases, $o, $v) {
if (isset($aliases[$o])) $o = $aliases[$o];
if (!isset($AC[$o])) return;
if (is_string($AC[$o])) $AC[$o] = $v;
if (is_bool($AC[$o])) $AC[$o] = (bool) $v;
if (is_bool($AC[$o])) $AC[$o] = ($v === '') ? true :(bool) $v;
if (is_int($AC[$o])) $AC[$o] = (int) $v;
}

View File

@ -107,7 +107,8 @@ foreach ($versions_to_test as $version) {
// This is the HTML Purifier website's test XML file. We could
// add more websites, i.e. more configurations to test.
$test->addTestCase(new RemoteTestCase('http://localhost/htmlpurifier/tests/?xml', 'http://localhost/htmlpurifier/tests/?xml&dry'));
$test->addTestCase(new RemoteTestCase('http://localhost/htmlpurifier/tests/?xml=1', 'http://localhost/htmlpurifier/tests/?xml=1&dry=1'));
$test->addTestCase(new RemoteTestCase('http://htmlpurifier.org/dev/tests/?xml=1', 'http://htmlpurifier.org/dev/tests/?xml=1&dry=1'));
if ($AC['xml']) {
$reporter = new XmlReporter();