mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 09:49:54 +09:00
issue 2239 Object, Embed, Iframe source allow by white list
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11024 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8e64ac6e2b
commit
927c944ff3
25 changed files with 1044 additions and 2 deletions
29
classes/security/phphtmlparser/src/ex_dumpurl.php
Executable file
29
classes/security/phphtmlparser/src/ex_dumpurl.php
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
<?
|
||||
// Example:
|
||||
// Dumps nodes from testfile.html.
|
||||
// To run: php < ex_dumpurl.php
|
||||
|
||||
include ("htmlparser.inc");
|
||||
$parser = HtmlParser_ForFile ("testfile.html");
|
||||
//$parser = HtmlParser_ForURL ("http://yahoo.com");
|
||||
while ($parser->parse()) {
|
||||
echo "-----------------------------------\r\n";
|
||||
echo "Name=" . $parser->iNodeName . ";";
|
||||
echo "Type=" . $parser->iNodeType . ";";
|
||||
if ($parser->iNodeType == NODE_TYPE_TEXT || $parser->iNodeType == NODE_TYPE_COMMENT) {
|
||||
echo "Value='" . $parser->iNodeValue . "'";
|
||||
}
|
||||
echo "\r\n";
|
||||
if ($parser->iNodeType == NODE_TYPE_ELEMENT) {
|
||||
echo "ATTRIBUTES: ";
|
||||
$attrValues = $parser->iNodeAttributes;
|
||||
$attrNames = array_keys($attrValues);
|
||||
$size = count($attrNames);
|
||||
for ($i = 0; $i < $size; $i++) {
|
||||
$name = $attrNames[$i];
|
||||
echo $attrNames[$i] . "=\"" . $attrValues[$name] . "\" ";
|
||||
}
|
||||
}
|
||||
echo "\r\n";
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue