~ubuntu-branches/ubuntu/natty/moodle/natty

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Tomasz Muras
  • Date: 2010-10-30 12:19:28 UTC
  • mfrom: (1.1.12 upstream) (3.1.10 squeeze)
  • Revision ID: james.westby@ubuntu.com-20101030121928-qzobi6mctpnk4dif
Tags: 1.9.9.dfsg2-2
* Added Romanian translation
* Updated Japanese translation (closes: #596820)
* Backporting security fixes from Moodle 1.9.10 (closes: #601384)
   - Updated embedded CAS to 1.1.3
   - Added patch for MDL-24523:
     clean_text() not filtering text in markdown format
   - Added patch for MDL-24810 and upgraded customized HTML Purifier to 4.2.0 
   - Added patch for MDL-24258:
     students can delete their forum posts later than $CFG->maxeditingtime 
     under certain conditions
   - Added patch for MDL-23377:
     Can't delete quiz attempts in course without enrolled students

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule
 
4
{
 
5
 
 
6
    public $name = 'Name';
 
7
 
 
8
    public function setup($config) {
 
9
        $elements = array('a', 'applet', 'form', 'frame', 'iframe', 'img', 'map');
 
10
        foreach ($elements as $name) {
 
11
            $element = $this->addBlankElement($name);
 
12
            $element->attr['name'] = 'CDATA';
 
13
            if (!$config->get('HTML.Attr.Name.UseCDATA')) {
 
14
                $element->attr_transform_post['NameSync'] = new HTMLPurifier_AttrTransform_NameSync();
 
15
            }
 
16
        }
 
17
    }
 
18
 
 
19
}
 
20
 
 
21
// vim: et sw=4 sts=4