~ubuntu-branches/ubuntu/trusty/moodle/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/htmlpurifier/HTMLPurifier/HTMLModule/Iframe.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2013-07-19 08:52:46 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130719085246-yebwditc2exoap2r
Tags: 2.5.1-1
* New upstream version: 2.5.1.
  - Fixes security issues:
    CVE-2013-2242 CVE-2013-2243 CVE-2013-2244 CVE-2013-2245
    CVE-2013-2246
* Depend on apache2 instead of obsolete apache2-mpm-prefork.
* Use packaged libphp-phpmailer (closes: #429339), adodb,
  HTMLPurifier, PclZip.
* Update debconf translations, thanks Salvatore Merone, Pietro Tollot,
  Joe Hansen, Yuri Kozlov, Holger Wansing, Américo Monteiro,
  Adriano Rafael Gomes, victory, Michał Kułach.
  (closes: #716972, #716986, #717080, #717108, #717278)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
/**
4
 
 * XHTML 1.1 Iframe Module provides inline frames.
5
 
 *
6
 
 * @note This module is not considered safe unless an Iframe
7
 
 * whitelisting mechanism is specified.  Currently, the only
8
 
 * such mechanism is %URL.SafeIframeRegexp
9
 
 */
10
 
class HTMLPurifier_HTMLModule_Iframe extends HTMLPurifier_HTMLModule
11
 
{
12
 
 
13
 
    public $name = 'Iframe';
14
 
    public $safe = false;
15
 
 
16
 
    public function setup($config) {
17
 
        if ($config->get('HTML.SafeIframe')) {
18
 
            $this->safe = true;
19
 
        }
20
 
        $this->addElement(
21
 
            'iframe', 'Inline', 'Flow', 'Common',
22
 
            array(
23
 
                'src' => 'URI#embedded',
24
 
                'width' => 'Length',
25
 
                'height' => 'Length',
26
 
                'name' => 'ID',
27
 
                'scrolling' => 'Enum#yes,no,auto',
28
 
                'frameborder' => 'Enum#0,1',
29
 
                'longdesc' => 'URI',
30
 
                'marginheight' => 'Pixels',
31
 
                'marginwidth' => 'Pixels',
32
 
            )
33
 
        );
34
 
    }
35
 
 
36
 
}
37
 
 
38
 
// vim: et sw=4 sts=4
 
1
<?php
 
2
 
 
3
/**
 
4
 * XHTML 1.1 Iframe Module provides inline frames.
 
5
 *
 
6
 * @note This module is not considered safe unless an Iframe
 
7
 * whitelisting mechanism is specified.  Currently, the only
 
8
 * such mechanism is %URL.SafeIframeRegexp
 
9
 */
 
10
class HTMLPurifier_HTMLModule_Iframe extends HTMLPurifier_HTMLModule
 
11
{
 
12
 
 
13
    public $name = 'Iframe';
 
14
    public $safe = false;
 
15
 
 
16
    public function setup($config) {
 
17
        if ($config->get('HTML.SafeIframe')) {
 
18
            $this->safe = true;
 
19
        }
 
20
        $this->addElement(
 
21
            'iframe', 'Inline', 'Flow', 'Common',
 
22
            array(
 
23
                'src' => 'URI#embedded',
 
24
                'width' => 'Length',
 
25
                'height' => 'Length',
 
26
                'name' => 'ID',
 
27
                'scrolling' => 'Enum#yes,no,auto',
 
28
                'frameborder' => 'Enum#0,1',
 
29
                'longdesc' => 'URI',
 
30
                'marginheight' => 'Pixels',
 
31
                'marginwidth' => 'Pixels',
 
32
            )
 
33
        );
 
34
    }
 
35
 
 
36
}
 
37
 
 
38
// vim: et sw=4 sts=4