-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathxhtml_purifier.html
26 lines (23 loc) · 949 Bytes
/
xhtml_purifier.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>xhtml_purifier</title>
<script src="xhtml_purifier.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function clean() {
var html = document.getElementById('html').value;
var clean_html = XHTMLPurifier.purify(html);
document.getElementById('clean_html').value = clean_html;
}
</script>
</head>
<body>
<h1>XHTML Purifier</h1>
<p>This is a small test page for the Javascript XHTML Purifier</p>
<textarea id="html" name="html" rows="10" cols="80"></textarea>
<textarea id="clean_html" name="clean_html" rows="10" cols="80"></textarea>
<a href="#" onclick="clean(); false;">Clean HTML</a>
</body>
</html>