mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-16 11:03:58 +02:00
Fix DOM bug where default encoding for HTML docs is not UTF-8.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@252 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
31
smoketests/utf8.php
Normal file
31
smoketests/utf8.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>HTMLPurifier UTF-8 Smoketest</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTMLPurifier UTF-8 Smoketest</h1>
|
||||
<?php
|
||||
|
||||
set_include_path('../library' . PATH_SEPARATOR . get_include_path());
|
||||
require_once 'HTMLPurifier.php';
|
||||
|
||||
$purifier = new HTMLPurifier();
|
||||
$string = '
|
||||
<ul>
|
||||
<li><b>Chinese</b> - 太極拳</li>
|
||||
<li><b>Russian</b> - ЊЎЖ</li>
|
||||
<li><b>Arabic</b> - لمنس</li>
|
||||
</ul>
|
||||
';
|
||||
|
||||
?>
|
||||
<h2>Raw</h2>
|
||||
<?php echo $string; ?>
|
||||
<h2>Purified</h2>
|
||||
<?php echo $purifier->purify($string); ?>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user