|
| preFilter ($html, $config, $context) |
|
| postFilter ($html, $config, $context) |
|
| preFilter ($html, $config, $context) |
| Pre-processor function, handles HTML before HTML Purifier. More...
|
|
| postFilter ($html, $config, $context) |
| Post-processor function, handles HTML after HTML Purifier. More...
|
|
Definition at line 3 of file YouTube.php.
◆ armorUrl()
HTMLPurifier_Filter_YouTube::armorUrl |
( |
|
$url | ) |
|
|
protected |
◆ postFilter()
HTMLPurifier_Filter_YouTube::postFilter |
( |
|
$html, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
- Parameters
-
- Returns
- string
Definition at line 31 of file YouTube.php.
References $html, and array.
33 $post_regex =
'#<span class="youtube-embed">((?:v|cp)/[A-Za-z0-9\-_=]+)</span>#';
34 return preg_replace_callback($post_regex,
array($this,
'postFilterCallback'),
$html);
Create styles array
The data for the language used.
◆ postFilterCallback()
HTMLPurifier_Filter_YouTube::postFilterCallback |
( |
|
$matches | ) |
|
|
protected |
- Parameters
-
- Returns
- string
Definition at line 50 of file YouTube.php.
References $url, and armorUrl().
53 return '<object width="425" height="350" type="application/x-shockwave-flash" ' .
54 'data="//www.youtube.com/' .
$url .
'">' .
55 '<param name="movie" value="//www.youtube.com/' .
$url .
'"></param>' .
57 '<embed src="//www.youtube.com/' .
$url .
'"' .
58 'type="application/x-shockwave-flash"' .
59 'wmode="transparent" width="425" height="350" />' .
◆ preFilter()
HTMLPurifier_Filter_YouTube::preFilter |
( |
|
$html, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
- Parameters
-
- Returns
- string
Definition at line 17 of file YouTube.php.
References $html.
19 $pre_regex =
'#<object[^>]+>.+?' .
20 '(?:http:)?//www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s';
21 $pre_replace =
'<span class="youtube-embed">\1</span>';
22 return preg_replace($pre_regex, $pre_replace,
$html);
◆ $name
HTMLPurifier_Filter_YouTube::$name = 'YouTube' |
The documentation for this class was generated from the following file:
- libs/composer/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php