ILIAS
Release_4_1_x_branch Revision 61804
|
Public Member Functions | |
Auth_Yadis_ParseHTML () | |
replaceEntities ($str) | |
Replace HTML entities (amp, lt, gt, and quot) as well as numeric entities (e.g. | |
removeQuotes ($str) | |
Strip single and double quotes off of a string, if they are present. | |
tagPattern ($tag_names, $close, $self_close) | |
Create a regular expression that will match an opening or closing tag from a set of names. | |
getMetaTags ($html_string) | |
Given an HTML document string, this finds all the META tags in the document, provided they are found in the <HTML><HEAD>...</HEAD> section of the document. | |
getHTTPEquiv ($html_string) | |
Looks for a META tag with an "http-equiv" attribute whose value is one of ("x-xrds-location", "x-yadis-location"), ignoring case. |
Data Fields | |
$_re_flags = "si" | |
private | |
$_removed_re = "<!--.*?-->|<!\[CDATA\[.*?\]\]>|<script\b(?!:)[^>]*>.*?<\/script>" | |
private | |
$_tag_expr = "<%s%s(?:\s.*?)?%s>" | |
private | |
$_attr_find = '\b([-\w]+)=(".*?"|\'.*?\'|.+?)[\/\s>]' | |
private |
Definition at line 23 of file ParseHTML.php.
Auth_Yadis_ParseHTML::Auth_Yadis_ParseHTML | ( | ) |
Definition at line 46 of file ParseHTML.php.
Auth_Yadis_ParseHTML::getHTTPEquiv | ( | $html_string | ) |
Looks for a META tag with an "http-equiv" attribute whose value is one of ("x-xrds-location", "x-yadis-location"), ignoring case.
If such a META tag is found, its "content" attribute value is returned.
string | $html_string | An HTML document in string format |
Definition at line 240 of file ParseHTML.php.
References getMetaTags().
Auth_Yadis_ParseHTML::getMetaTags | ( | $html_string | ) |
Given an HTML document string, this finds all the META tags in the document, provided they are found in the <HTML><HEAD>...</HEAD> section of the document.
The <HTML> tag may be missing.
private
string | $html_string | An HTMl document string |
Definition at line 157 of file ParseHTML.php.
References removeQuotes(), replaceEntities(), and tagPattern().
Referenced by getHTTPEquiv().
Auth_Yadis_ParseHTML::removeQuotes | ( | $str | ) |
Strip single and double quotes off of a string, if they are present.
private
string | $str | The original string |
Definition at line 100 of file ParseHTML.php.
Referenced by getMetaTags().
Auth_Yadis_ParseHTML::replaceEntities | ( | $str | ) |
Replace HTML entities (amp, lt, gt, and quot) as well as numeric entities (e.g.
#x9f;) with their actual values and return the new string.
private
string | $str | The string in which to look for entities |
Definition at line 77 of file ParseHTML.php.
Referenced by getMetaTags().
Auth_Yadis_ParseHTML::tagPattern | ( | $tag_names, | |
$close, | |||
$self_close | |||
) |
Create a regular expression that will match an opening or closing tag from a set of names.
private
mixed | $tag_names | Tag names to match |
mixed | $close | false/0 = no, true/1 = yes, other = maybe |
mixed | $self_close | false/0 = no, true/1 = yes, other = maybe |
Definition at line 126 of file ParseHTML.php.
Referenced by getMetaTags().
Auth_Yadis_ParseHTML::$_attr_find = '\b([-\w]+)=(".*?"|\'.*?\'|.+?)[\/\s>]' |
private
Definition at line 44 of file ParseHTML.php.
Auth_Yadis_ParseHTML::$_re_flags = "si" |
private
Definition at line 28 of file ParseHTML.php.
Auth_Yadis_ParseHTML::$_removed_re = "<!--.*?-->|<!\[CDATA\[.*?\]\]>|<script\b(?!:)[^>]*>.*?<\/script>" |
private
Definition at line 33 of file ParseHTML.php.
Auth_Yadis_ParseHTML::$_tag_expr = "<%s%s(?:\s.*?)?%s>" |
private
Definition at line 39 of file ParseHTML.php.