]> git.wh0rd.org - tt-rss.git/blame - lib/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php
remove Archived articles from Uncategorized view
[tt-rss.git] / lib / htmlpurifier / library / HTMLPurifier / HTMLModule / SafeEmbed.php
CommitLineData
f45a286b
AD
1<?php
2
3/**
4 * A "safe" embed module. See SafeObject. This is a proprietary element.
5 */
6class HTMLPurifier_HTMLModule_SafeEmbed extends HTMLPurifier_HTMLModule
7{
8
9 public $name = 'SafeEmbed';
10
11 public function setup($config) {
12
f4f0f80d 13 $max = $config->get('HTML.MaxImgLength');
f45a286b
AD
14 $embed = $this->addElement(
15 'embed', 'Inline', 'Empty', 'Common',
16 array(
17 'src*' => 'URI#embedded',
18 'type' => 'Enum#application/x-shockwave-flash',
19 'width' => 'Pixels#' . $max,
20 'height' => 'Pixels#' . $max,
21 'allowscriptaccess' => 'Enum#never',
22 'allownetworking' => 'Enum#internal',
f4f0f80d
AD
23 'flashvars' => 'Text',
24 'wmode' => 'Enum#window,transparent,opaque',
f45a286b
AD
25 'name' => 'ID',
26 )
27 );
28 $embed->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeEmbed();
29
30 }
31
32}
33
34// vim: et sw=4 sts=4