mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +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
70
classes/security/phphtmlparser/README
Executable file
70
classes/security/phphtmlparser/README
Executable file
|
|
@ -0,0 +1,70 @@
|
|||
|
||||
HTML Parser for PHP 4
|
||||
---------------------
|
||||
|
||||
This is a simple PHP based HTML parser.
|
||||
|
||||
How to Use
|
||||
----------
|
||||
|
||||
Simply copy src/htmlparser.inc to a location in your
|
||||
codebase where you'd like to be able to include it.
|
||||
The PHP file which uses the parser might look like
|
||||
this:
|
||||
|
||||
<?
|
||||
include ("htmlparser.inc");
|
||||
|
||||
$htmlText = "... HTML text here ...";
|
||||
HtmlParser parser = new HtmlParser ($htmlText);
|
||||
while ($parser->parse()) {
|
||||
|
||||
// Data you can use here:
|
||||
//
|
||||
// $parser->iNodeType
|
||||
// $parser->iNodeName
|
||||
// $parser->iNodeValue
|
||||
// $parser->iNodeAttributes
|
||||
|
||||
}
|
||||
|
||||
You will find additional documentation for each
|
||||
field in the source code.
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Files of Interest
|
||||
-----------------
|
||||
|
||||
src/htmlparser.inc -- Has HtmlParser class
|
||||
src/html2text.inc -- Has Html2Text class
|
||||
src/ex_dumptags.php -- Example: Dumps HTML nodes from test HTML string
|
||||
src/ex_html2text.php -- Example: Dumps text for test HTML string
|
||||
|
||||
Running examples offline
|
||||
------------------------
|
||||
|
||||
On a Unix system, you can run the examples as follows
|
||||
if you have PHP installed:
|
||||
|
||||
cd src
|
||||
php < ex_dumptags.php
|
||||
php < ex_html2text.php
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This is an open source project. The license is
|
||||
based on the Apache Software License. See the file
|
||||
named LICENSE.
|
||||
|
||||
Author
|
||||
------
|
||||
|
||||
The parser and the HTML-to-text example were written
|
||||
by Jose Solorzano of Starnetsys, LLC. If you need a
|
||||
program or website developed, professionally, within
|
||||
budget, and on time, contact us (http://starnetsys.com)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue