1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 03:10:09 +02:00

Detect if domxml extension is loaded, and use DirectLex accordingly.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2008-10-08 17:06:10 -04:00
parent f7bc0b0875
commit d304c5c976
3 changed files with 25 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
--TEST--
DirectLex with domxml test
--SKIPIF--
<?php
if (!extension_loaded('dom')) {
echo "skip - dom not available";
} elseif (!extension_loaded('domxml')) {
echo "skip - domxml not loaded";
}
--FILE--
<?php
require '../library/HTMLPurifier.auto.php';
echo get_class(HTMLPurifier_Lexer::create(HTMLPurifier_Config::createDefault()));
--EXPECT--
HTMLPurifier_Lexer_DirectLex