~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to lib/htmlpurifier/HTMLPurifier/Strategy.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * Supertype for classes that define a strategy for modifying/purifying tokens.
 
5
 * 
 
6
 * While HTMLPurifier's core purpose is fixing HTML into something proper, 
 
7
 * strategies provide plug points for extra configuration or even extra
 
8
 * features, such as custom tags, custom parsing of text, etc.
 
9
 */
 
10
 
 
11
HTMLPurifier_ConfigSchema::define(
 
12
    'Core', 'EscapeInvalidTags', false, 'bool',
 
13
    'When true, invalid tags will be written back to the document as plain '.
 
14
    'text.  Otherwise, they are silently dropped.'
 
15
);
 
16
 
 
17
class HTMLPurifier_Strategy
 
18
{
 
19
    
 
20
    /**
 
21
     * Executes the strategy on the tokens.
 
22
     * 
 
23
     * @param $tokens Array of HTMLPurifier_Token objects to be operated on.
 
24
     * @param $config Configuration options
 
25
     * @returns Processed array of token objects.
 
26
     */
 
27
    function execute($tokens, $config, &$context) {
 
28
        trigger_error('Cannot call abstract function', E_USER_ERROR);
 
29
    }
 
30
    
 
31
}
 
32