Add some extra helpful data for FOCUS
[htmlpurifier.git] / NEWS
blob92a3c879d297ff00b75bff6ceedae52b88de91e8
1 NEWS ( CHANGELOG and HISTORY )                                     HTMLPurifier
2 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 = KEY ====================
5     # Breaks back-compat
6     ! Feature
7     - Bugfix
8       + Sub-comment
9     . Internal change
10 ==========================
12 3.1.1, released 2008-06-19
13 # %URI.Munge now, by default, does not munge resources (for example, <img src="">)
14   In order to enable this again, please set %URI.MungeResources to true. 
15 ! More robust imagecrash protection with height/width CSS with %CSS.MaxImgLength,
16   and height/width HTML with %HTML.MaxImgLength.
17 ! %URI.MungeSecretKey for secure URI munging. Thanks Chris
18   for sponsoring this feature. Check out the corresponding documentation
19   for details. (Att Nightly testers: The API for this feature changed before
20   the general release. Namely, rename your directives %URI.SecureMungeSecretKey =>
21   %URI.MungeSecretKey and and %URI.SecureMunge => %URI.Munge)
22 ! Implemented post URI filtering. Set member variable $post to true to set
23   a URIFilter as such.
24 ! Allow modules to define injectors via $info_injector. Injectors are 
25   automatically disabled if injector's needed elements are not found.
26 ! Support for "safe" objects added, use %HTML.SafeObject and %HTML.SafeEmbed.
27   Thanks Chris for sponsoring. If you've been using ad hoc code from the
28   forums, PLEASE use this instead.
29 ! Added substitutions for %e, %n, %a and %p in %URI.Munge (in order,
30   embedded, tag name, attribute name, CSS property name). See %URI.Munge
31   for more details. Requested by Jochem Blok.
32 - Disable percent height/width attributes for img.
33 - AttrValidator operations are now atomic; updates to attributes are not
34   manifest in token until end of operations. This prevents naughty internal
35   code from directly modifying CurrentToken when they're not supposed to.
36   This semantics change was requested by frank farmer.
37 - Percent encoding checks enabled for URI query and fragment
38 - Fix stray backslashes in font-family; CSS Unicode character escapes are
39   now properly resolved (although *only* in font-family). Thanks Takeshi Terada
40   for reporting.
41 - Improve parseCDATA algorithm to take into account newline normalization
42 - Account for browser confusion between Yen character and backslash in
43   Shift_JIS encoding. This fix generalizes to any other encoding which is not
44   a strict superset of printable ASCII. Thanks Takeshi Terada for reporting.
45 - Fix missing configuration parameter in Generator calls. Thanks vs for the
46   partial patch.
47 - Improved adherence to Unicode by checking for non-character codepoints.
48   Thanks Geoffrey Sneddon for reporting. This may result in degraded
49   performance for extremely large inputs.
50 - Allow CSS property-value pair ''text-decoration: none''. Thanks Jochem Blok
51   for reporting.
52 . Added HTMLPurifier_UnitConverter and HTMLPurifier_Length for convenient
53   handling of CSS-style lengths. HTMLPurifier_AttrDef_CSS_Length now uses
54   this class.
55 . API of HTMLPurifier_AttrDef_CSS_Length changed from __construct($disable_negative)
56   to __construct($min, $max). __construct(true) is equivalent to
57   __construct('0').
58 . Added HTMLPurifier_AttrDef_Switch class
59 . Rename HTMLPurifier_HTMLModule_Tidy->construct() to setup() and bubble method
60   up inheritance hierarchy to HTMLPurifier_HTMLModule. All HTMLModules
61   get this called with the configuration object.  All modules now
62   use this rather than __construct(), although legacy code using constructors
63   will still work--the new format, however, lets modules access the
64   configuration object for HTML namespace dependant tweaks.
65 . AttrDef_HTML_Pixels now takes a single construction parameter, pixels.
66 . ConfigSchema data-structure heavily optimized; on average it uses a third
67   the memory it did previously. The interface has changed accordingly,
68   consult changes to HTMLPurifier_Config for details.
69 . Variable parsing types now are magic integers instead of strings
70 . Added benchmark for ConfigSchema
71 . HTMLPurifier_Generator requires $config and $context parameters. If you 
72   don't know what they should be, use HTMLPurifier_Config::createDefault()
73   and new HTMLPurifier_Context().
74 . Printers now properly distinguish between output configuration, and 
75   target configuration. This is not applicable to scripts using
76   the Printers for HTML Purifier related tasks.
77 . HTML/CSS Printers must be primed with prepareGenerator($gen_config), otherwise
78   fatal errors will ensue.
79 . URIFilter->prepare can return false in order to abort loading of the filter
80 . Factory for AttrDef_URI implemented, URI#embedded to indicate URI that embeds
81   an external resource.
82 . %URI.Munge functionality factored out into a post-filter class.
83 . Added CurrentCSSProperty context variable during CSS validation
85 3.1.0, released 2008-05-18
86 # Unnecessary references to objects (vestiges of PHP4) removed from method
87   signatures.  The following methods do not need references when assigning from
88   them and will result in E_STRICT errors if you try:
89     + HTMLPurifier_Config->get*Definition() [* = HTML, CSS]
90     + HTMLPurifier_ConfigSchema::instance()
91     + HTMLPurifier_DefinitionCacheFactory::instance()
92     + HTMLPurifier_DefinitionCacheFactory->create()
93     + HTMLPurifier_DoctypeRegistry->register()
94     + HTMLPurifier_DoctypeRegistry->get()
95     + HTMLPurifier_HTMLModule->addElement()
96     + HTMLPurifier_HTMLModule->addBlankElement()
97     + HTMLPurifier_LanguageFactory::instance()
98 # Printer_ConfigForm's get*() functions were static-ified
99 # %HTML.ForbiddenAttributes requires attribute declarations to be in the
100   form of tag@attr, NOT tag.attr (which will throw an error and won't do
101   anything). This is for forwards compatibility with XML; you'd do best
102   to migrate an %HTML.AllowedAttributes directives to this syntax too.
103 ! Allow index to be false for config from form creation
104 ! Added HTMLPurifier::VERSION constant
105 ! Commas, not dashes, used for serializer IDs. This change is forwards-compatible
106   and allows for version numbers like "3.1.0-dev".
107 ! %HTML.Allowed deals gracefully with whitespace anywhere, anytime!
108 ! HTML Purifier's URI handling is a lot more robust, with much stricter
109   validation checks and better percent encoding handling. Thanks Gareth Heyes
110   for indicating security vulnerabilities from lax percent encoding.
111 ! Bootstrap autoloader deals more robustly with classes that don't exist,
112   preventing class_exists($class, true) from barfing.
113 - InterchangeBuilder now alphabetizes its lists
114 - Validation error in configdoc output fixed
115 - Iconv and other encoding errors muted even with custom error handlers that
116   do not honor error_reporting
117 - Add protection against imagecrash attack with CSS height/width
118 - HTMLPurifier::instance() created for consistency, is equivalent to getInstance()
119 - Fixed and revamped broken ConfigForm smoketest
120 - Bug with bool/null fields in Printer_ConfigForm fixed
121 - Bug with global forbidden attributes fixed
122 - Improved error messages for allowed and forbidden HTML elements and attributes
123 - Missing (or null) in configdoc documentation restored
124 - If DOM throws and exception during parsing with PH5P (occurs in newer versions
125   of DOM), HTML Purifier punts to DirectLex
126 - Fatal error with unserialization of ScriptRequired
127 - Created directories are now chmod'ed properly
128 - Fixed bug with fallback languages in LanguageFactory
129 - Standalone testing setup properly with autoload
130 . Out-of-date documentation revised
131 . UTF-8 encoding check optimization as suggested by Diego
132 . HTMLPurifier_Error removed in favor of exceptions
133 . More copy() function removed; should use clone instead
134 . More extensive unit tests for HTMLDefinition
135 . assertPurification moved to central harness
136 . HTMLPurifier_Generator accepts $config and $context parameters during
137   instantiation, not runtime
138 . Double-quotes outside of attribute values are now unescaped
140 3.1.0rc1, released 2008-04-22
141 # Autoload support added. Internal require_once's removed in favor of an
142   explicit require list or autoloading. To use HTML Purifier,
143   you must now either use HTMLPurifier.auto.php
144   or HTMLPurifier.includes.php; setting the include path and including
145   HTMLPurifier.php is insufficient--in such cases include HTMLPurifier.autoload.php
146   as well to register our autoload handler (or modify your autoload function
147   to check HTMLPurifier_Bootstrap::getPath($class)). You can also use
148   HTMLPurifier.safe-includes.php for a less performance friendly but more
149   user-friendly library load.
150 # HTMLPurifier_ConfigSchema static functions are officially deprecated. Schema
151   information is stored in the ConfigSchema directory, and the
152   maintenance/generate-schema-cache.php generates the schema.ser file, which
153   is now instantiated. Support for userland schema changes coming soon!
154 # HTMLPurifier_Config will now throw E_USER_NOTICE when you use a directive
155   alias; to get rid of these errors just modify your configuration to use
156   the new directive name.
157 # HTMLPurifier->addFilter is deprecated; built-in filters can now be
158   enabled using %Filter.$filter_name or by setting your own filters using
159   %Filter.Custom
160 # Directive-level safety properties superceded in favor of module-level
161   safety. Internal method HTMLModule->addElement() has changed, although 
162   the externally visible HTMLDefinition->addElement has *not* changed.
163 ! Extra utility classes for testing and non-library operations can
164   be found in extras/. Specifically, these are FSTools and ConfigDoc.
165   You may find a use for these in your own project, but right now they
166   are highly experimental and volatile.
167 ! Integration with PHPT allows for automated smoketests
168 ! Limited support for proprietary HTML elements, namely <marquee>, sponsored
169   by Chris. You can enable them with %HTML.Proprietary if your client
170   demands them.
171 ! Support for !important CSS cascade modifier. By default, this will be stripped
172   from CSS, but you can enable it using %CSS.AllowImportant
173 ! Support for display and visibility CSS properties added, set %CSS.AllowTricky
174   to true to use them.
175 ! HTML Purifier now has its own Exception hierarchy under HTMLPurifier_Exception.
176   Developer error (not enduser error) can cause these to be triggered.
177 ! Experimental kses() wrapper introduced with HTMLPurifier.kses.php
178 ! Finally %CSS.AllowedProperties for tweaking allowed CSS properties without
179   mucking around with HTMLPurifier_CSSDefinition
180 ! ConfigDoc output has been enhanced with version and deprecation info.
181 ! %HTML.ForbiddenAttributes and %HTML.ForbiddenElements implemented.
182 - Autoclose now operates iteratively, i.e. <span><span><div> now has
183   both span tags closed.
184 - Various HTMLPurifier_Config convenience functions now accept another parameter
185   $schema which defines what HTMLPurifier_ConfigSchema to use besides the
186   global default.
187 - Fix bug with trusted script handling in libxml versions later than 2.6.28.
188 - Fix bug in ExtractStyleBlocks with comments in style tags
189 - Fix bug in comment parsing for DirectLex
190 - Flush output now displayed when in command line mode for unit tester
191 - Fix bug with rgb(0, 1, 2) color syntax with spaces inside shorthand syntax
192 - HTMLPurifier_HTMLDefinition->addAttribute can now be called multiple times
193   on the same element without emitting errors.
194 - Fixed fatal error in PH5P lexer with invalid tag names
195 . Plugins now get their own changelogs according to project conventions.
196 . Convert tokens to use instanceof, reducing memory footprint and
197   improving comparison speed.
198 . Dry runs now supported in SimpleTest; testing facilities improved
199 . Bootstrap class added for handling autoloading functionality
200 . Implemented recursive glob at FSTools->globr
201 . ConfigSchema now has instance methods for all corresponding define* 
202   static methods.
203 . A couple of new historical maintenance scripts were added.
204 . HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php split into two files
205 . tests/index.php can now be run from any directory.
206 . HTMLPurifier_Token subclasses split into seperate files
207 . HTMLPURIFIER_PREFIX now is defined in Bootstrap.php, NOT HTMLPurifier.php
208 . HTMLPURIFIER_PREFIX can now be defined outside of HTML Purifier
209 . New --php=php flag added, allows PHP executable to be specified (command
210   line only!)
211 . htmlpurifier_add_test() preferred method to translate test files in to
212   classes, because it handles PHPT files too.
213 . Debugger class is deprecated and will be removed soon.
214 . Command line argument parsing for testing scripts revamped, now --opt value
215   format is supported.
216 . Smoketests now cleanup after magic quotes
217 . Generator now can output comments (however, comments are still stripped
218   from HTML Purifier output)
219 . HTMLPurifier_ConfigSchema->validate() deprecated in favor of
220   HTMLPurifier_VarParser->parse()
221 . Integers auto-cast into float type by VarParser.
222 . HTMLPURIFIER_STRICT removed; no validation is performed on runtime, only 
223   during cache generation
224 . Reordered script calls in maintenance/flush.php
225 . Command line scripts now honor exit codes
226 . When --flush fails in unit testers, abort tests and print message
227 . Improved documentation in docs/dev-flush.html about the maintenance scripts
228 . copy() methods removed in favor of clone keyword
230 3.0.0, released 2008-01-06
231 # HTML Purifier is PHP 5 only! The 2.1.x branch will be maintained
232   until PHP 4 is completely deprecated, but no new features will be added
233   to it.
234   + Visibility declarations added
235   + Constructor methods renamed to __construct()
236   + PHP4 reference cruft removed (in progress)
237 ! CSS properties are now case-insensitive
238 ! DefinitionCacheFactory now can register new implementations
239 ! New HTMLPurifier_Filter_ExtractStyleBlocks for extracting <style> from
240   documents and cleaning their contents up. Requires the CSSTidy library
241   <http://csstidy.sourceforge.net/>. You can access the blocks with the
242   'StyleBlocks' Context variable ($purifier->context->get('StyleBlocks')).
243   The output CSS can also be "scoped" for a specific element, use:
244   %Filter.ExtractStyleBlocksScope
245 ! Experimental support for some proprietary CSS attributes allowed:
246   opacity (and all of the browser-specific equivalents) and scrollbar colors.
247   Enable by setting %CSS.Proprietary to true.
248 - Colors missing # but in hex form will be corrected
249 - CSS Number algorithm improved
250 - Unit testing and multi-testing now on steroids: command lines,
251   XML output, and other goodies now added.
252 . Unit tests for Injector improved
253 . New classes:
254   + HTMLPurifier_AttrDef_CSS_AlphaValue
255   + HTMLPurifier_AttrDef_CSS_Filter
256 . Multitest now has a file docblock
258 2.1.3, released 2007-11-05
259 ! tests/multitest.php allows you to test multiple versions by running
260   tests/index.php through multiple interpreters using `phpv` shell
261   script (you must provide this script!)
262 - Fixed poor include ordering for Email URI AttrDefs, causes fatal errors
263   on some systems.
264 - Injector algorithm further refined: off-by-one error regarding skip 
265   counts for dormant injectors fixed
266 - Corrective blockquote definition now enabled for HTML 4.01 Strict
267 - Fatal error when <img> tag (or any other element with required attributes)
268   has 'id' attribute fixed, thanks NykO18 for reporting
269 - Fix warning emitted when a non-supported URI scheme is passed to the
270   MakeAbsolute URIFilter, thanks NykO18 (again)
271 - Further refine AutoParagraph injector. Behavior inside of elements
272   allowing paragraph tags clarified: only inline content delimeted by
273   double newlines (not block elements) are paragraphed.
274 - Buggy treatment of end tags of elements that have required attributes
275   fixed (does not manifest on default tag-set)
276 - Spurious internal content reorganization error suppressed
277 - HTMLDefinition->addElement now returns a reference to the created
278   element object, as implied by the documentation
279 - Phorum mod's HTML Purifier help message expanded (unreleased elsewhere)
280 - Fix a theoretical class of infinite loops from DirectLex reported
281   by Nate Abele
282 - Work around unnecessary DOMElement type-cast in PH5P that caused errors
283   in PHP 5.1
284 - Work around PHP 4 SimpleTest lack-of-error complaining for one-time-only
285   HTMLDefinition errors, this may indicate problems with error-collecting
286   facilities in PHP 5
287 - Make ErrorCollectorEMock work in both PHP 4 and PHP 5
288 - Make PH5P work with PHP 5.0 by removing unnecessary array parameter typedef
289 . %Core.AcceptFullDocuments renamed to %Core.ConvertDocumentToFragment 
290   to better communicate its purpose
291 . Error unit tests can now specify the expectation of no errors. Future
292   iterations of the harness will be extremely strict about what errors
293   are allowed
294 . Extend Injector hooks to allow for more powerful injector routines
295 . HTMLDefinition->addBlankElement created, as according to the HTMLModule
296   method
297 . Doxygen configuration file updated, with minor improvements
298 . Test runner now checks for similarly named files in conf/ directory too.
299 . Minor cosmetic change to flush-definition-cache.php: trailing newline is
300   outputted
301 . Maintenance script for generating PH5P patch added, original PH5P source
302   file also added under version control
303 . Full unit test runner script title made more descriptive with PHP version
304 . Updated INSTALL file to state that 4.3.7 is the earliest version we
305   are actively testing
307 2.1.2, released 2007-09-03
308 ! Implemented Object module for trusted users
309 ! Implemented experimental HTML5 parsing mode using PH5P. To use, add
310   this to your code:
311         require_once 'HTMLPurifier/Lexer/PH5P.php';
312         $config->set('Core', 'LexerImpl', 'PH5P');
313   Note that this Lexer introduces some classes not in the HTMLPurifier
314   namespace.  Also, this is PHP5 only.
315 ! CSS property border-spacing implemented
316 - Fix non-visible parsing error in DirectLex with empty tags that have
317   slashes inside attribute values.
318 - Fix typo in CSS definition: border-collapse:seperate; was incorrectly
319   accepted as valid CSS. Usually non-visible, because this styling is the
320   default for tables in most browsers. Thanks Brett Zamir for pointing
321   this out.
322 - Fix validation errors in configuration form
323 - Hammer out a bunch of edge-case bugs in the standalone distribution
324 - Inclusion reflection removed from URISchemeRegistry; you must manually
325   include any new schema files you wish to use
326 - Numerous typo fixes in documentation thanks to Brett Zamir
327 . Unit test refactoring for one logical test per test function
328 . Config and context parameters in ComplexHarness deprecated: instead, edit
329   the $config and $context member variables
330 . HTML wrapper in DOMLex now takes DTD identifiers into account; doesn't
331   really make a difference, but is good for completeness sake
332 . merge-library.php script refactored for greater code reusability and
333   PHP4 compatibility
335 2.1.1, released 2007-08-04
336 - Fix show-stopper bug in %URI.MakeAbsolute functionality
337 - Fix PHP4 syntax error in standalone version
338 . Add prefix directory to include path for standalone, this prevents
339   other installations from clobbering the standalone's URI schemes
340 . Single test methods can be invoked by prefixing with __only
342 2.1.0, released 2007-08-02
343 # flush-htmldefinition-cache.php superseded in favor of a generic
344   flush-definition-cache.php script, you can clear a specific cache
345   by passing its name as a parameter to the script
346 ! Phorum mod implemented for HTML Purifier
347 ! With %Core.AggressivelyFixLt, <3 and similar emoticons no longer
348   trigger HTML removal in PHP5 (DOMLex). This directive is not necessary
349   for PHP4 (DirectLex).
350 ! Standalone file now available, which greatly reduces the amount of
351   includes (although there are still a few files that reside in the
352   standalone folder)
353 ! Relative URIs can now be transformed into their absolute equivalents
354   using %URI.Base and %URI.MakeAbsolute
355 ! Ruby implemented for XHTML 1.1
356 ! You can now define custom URI filtering behavior, see enduser-uri-filter.html
357   for more details
358 ! UTF-8 font names now supported in CSS
359 - AutoFormatters emit friendly error messages if tags or attributes they
360   need are not allowed
361 - ConfigForm's compactification of directive names is now configurable
362 - AutoParagraph autoformatter algorithm refined after field-testing
363 - XHTML 1.1 now applies XHTML 1.0 Strict cleanup routines, namely
364   blockquote wrapping
365 - Contents of <style> tags removed by default when tags are removed
366 . HTMLPurifier_Config->getSerial() implemented, this is extremely useful
367   for output cache invalidation
368 . ConfigForm printer now can retrieve CSS and JS files as strings, in
369   case HTML Purifier's directory is not publically accessible
370 . Introduce new text/itext configuration directive values: these represent
371   longer strings that would be more appropriately edited with a textarea
372 . Allow newlines to act as separators for lists, hashes, lookups and
373   %HTML.Allowed
374 . ConfigForm generates textareas instead of text inputs for lists, hashes,
375   lookups, text and itext fields
376 . Hidden element content removal genericized: %Core.HiddenElements can
377   be used to customize this behavior, by default <script> and <style> are
378   hidden
379 . Added HTMLPURIFIER_PREFIX constant, should be used instead of dirname(__FILE__)
380 . Custom ChildDef added to default include list
381 . URIScheme reflection improved: will not attempt to include file if class
382   already exists. May clobber autoload, so I need to keep an eye on it
383 . ConfigSchema heavily optimized, will only collect information and validate
384   definitions when HTMLPURIFIER_SCHEMA_STRICT is true.
385 . AttrDef_URI unit tests and implementation refactored
386 . benchmarks/ directory now protected from public view with .htaccess file;
387   run the tests via command line
388 . URI scheme is munged off if there is no authority and the scheme is the
389   default one
390 . All unit tests inherit from HTMLPurifier_Harness, not UnitTestCase
391 . Interface for URIScheme changed
392 . Generic URI object to hold components of URI added, most systems involved
393   in URI validation have been migrated to use it
394 . Custom filtering for URIs factored out to URIDefinition interface for
395   maximum extensibility
397 2.0.1, released 2007-06-27
398 ! Tag auto-closing now based on a ChildDef heuristic rather than a
399   manually set auto_close array; some behavior may change
400 ! Experimental AutoFormat functionality added: auto-paragraph and
401   linkify your HTML input by setting %AutoFormat.AutoParagraph and
402   %AutoFormat.Linkify to true
403 ! Newlines normalized internally, and then converted back to the
404   value of PHP_EOL. If this is not desired, set your newline format
405   using %Output.Newline.
406 ! Beta error collection, messages are implemented for the most generic
407   cases involving Lexing or Strategies
408 - Clean up special case code for <script> tags
409 - Reorder includes for DefinitionCache decorators, fixes a possible
410   missing class error
411 - Fixed bug where manually modified definitions were not saved via cache
412   (mostly harmless, except for the fact that it would be a little slower)
413 - Configuration objects with different serials do not clobber each
414   others when revision numbers are unequal
415 - Improve Serializer DefinitionCache directory permissions checks
416 - DefinitionCache no longer throws errors when it encounters old
417   serial files that do not conform to the current style
418 - Stray xmlns attributes removed from configuration documentation
419 - configForm.php smoketest no longer has XSS vulnerability due to
420   unescaped print_r output
421 - Printer adheres to configuration's directives on output format
422 - Fix improperly named form field in ConfigForm printer
423 . Rewire some test-cases to swallow errors rather than expect them
424 . HTMLDefinition printer updated with some of the new attributes
425 . DefinitionCache keys reordered to reflect precedence: version number,
426   hash, then revision number
427 . %Core.DefinitionCache renamed to %Cache.DefinitionImpl
428 . Interlinking in configuration documentation added using
429   Injector_PurifierLinkify
430 . Directives now keep track of aliases to themselves
431 . Error collector now requires a severity to be passed, use PHP's internal
432   error constants for this
433 . HTMLPurifier_Config::getAllowedDirectivesForForm implemented, allows
434   much easier selective embedding of configuration values
435 . Doctype objects now accept public and system DTD identifiers
436 . %HTML.Doctype is now constrained by specific values, to specify a custom
437   doctype use new %HTML.CustomDoctype
438 . ConfigForm truncates long directives to keep the form small, and does
439   not re-output namespaces
441 2.0.0, released 2007-06-20
442 # Completely refactored HTMLModuleManager, decentralizing safety
443   information
444 # Transform modules changed to Tidy modules, which offer more flexibility
445   and better modularization
446 # Configuration object now finalizes itself when a read operation is
447   performed on it, ensuring that its internal state stays consistent.
448   To revert this behavior, you can set the $autoFinalize member variable 
449   off, but it's not recommended.
450 # New compact syntax for AttrDef objects that can be used to instantiate
451   new objects via make()
452 # Definitions (esp. HTMLDefinition) are now cached for a significant
453   performance boost. You can disable caching by setting %Core.DefinitionCache
454   to null. You CANNOT edit raw definitions without setting the corresponding
455   DefinitionID directive (%HTML.DefinitionID for HTMLDefinition).
456 # Contents between <script> tags are now completely removed if <script>
457   is not allowed
458 # Prototype-declarations for Lexer removed in favor of configuration
459   determination of Lexer implementations.
460 ! HTML Purifier now works in PHP 4.3.2.
461 ! Configuration form-editing API makes tweaking HTMLPurifier_Config a
462   breeze!
463 ! Configuration directives that accept hashes now allow new string
464   format: key1:value1,key2:value2
465 ! ConfigDoc now factored into OOP design
466 ! All deprecated elements now natively supported
467 ! Implement TinyMCE styled whitelist specification format in
468   %HTML.Allowed
469 ! Config object gives more friendly error messages when things go wrong
470 ! Advanced API implemented: easy functions for creating elements (addElement)
471   and attributes (addAttribute) on HTMLDefinition
472 ! Add native support for required attributes
473 - Deprecated and removed EnableRedundantUTF8Cleaning. It didn't even work!
474 - DOMLex will not emit errors when a custom error handler that does not
475   honor error_reporting is used
476 - StrictBlockquote child definition refrains from wrapping whitespace
477   in tags now.
478 - Bug resulting from tag transforms to non-allowed elements fixed
479 - ChildDef_Custom's regex generation has been improved, removing several
480   false positives
481 . Unit test for ElementDef created, ElementDef behavior modified to
482   be more flexible
483 . Added convenience functions for HTMLModule constructors
484 . AttrTypes now has accessor functions that should be used instead
485   of directly manipulating info
486 . TagTransform_Center deprecated in favor of generic TagTransform_Simple
487 . Add extra protection in AttrDef_URI against phantom Schemes
488 . Doctype object added to HTMLDefinition which describes certain aspects
489   of the operational document type
490 . Lexer is now pre-emptively included, with a conditional include for the
491   PHP5 only version.
492 . HTMLDefinition and CSSDefinition have a common parent class: Definition.
493 . DirectLex can now track line-numbers
494 . Preliminary error collector is in place, although no code actually reports
495   errors yet
496 . Factor out most of ValidateAttributes to new AttrValidator class
498 1.6.1, released 2007-05-05
499 ! Support for more deprecated attributes via transformations:
500   + hspace and vspace in img
501   + size and noshade in hr
502   + nowrap in td
503   + clear in br
504   + align in caption, table, img and hr
505   + type in ul, ol and li
506 ! DirectLex now preserves text in which a < bracket is followed by
507   a non-alphanumeric character. This means that certain emoticons
508   are now preserved.
509 ! %Core.RemoveInvalidImg is now operational, when set to false invalid
510   images will hang around with an empty src
511 ! target attribute in a tag supported, use %Attr.AllowedFrameTargets
512   to enable
513 ! CSS property white-space now allows nowrap (supported in all modern
514   browsers) but not others (which have spotty browser implementations)
515 ! XHTML 1.1 mode now sort-of works without any fatal errors, and
516   lang is now moved over to xml:lang.
517 ! Attribute transformation smoketest available at smoketests/attrTransform.php
518 ! Transformation of font's size attribute now handles super-large numbers
519 - Possibly fatal bug with __autoload() fixed in module manager
520 - Invert HTMLModuleManager->addModule() processing order to check
521   prefixes first and then the literal module
522 - Empty strings get converted to empty arrays instead of arrays with
523   an empty string in them.
524 - Merging in attribute lists now works.
525 . Demo script removed: it has been added to the website's repository
526 . Basic.php script modified to work out of the box
527 . Refactor AttrTransform classes to reduce duplication
528 . AttrTransform_TextAlign axed in favor of a more general
529   AttrTransform_EnumToCSS, refer to HTMLModule/TransformToStrict.php to
530   see how the new equivalent is implemented
531 . Unit tests now use exclusively assertIdentical
533 1.6.0, released 2007-04-01
534 ! Support for most common deprecated attributes via transformations:
535   + bgcolor in td, th, tr and table
536   + border in img
537   + name in a and img
538   + width in td, th and hr
539   + height in td, th
540 ! Support for CSS attribute 'height' added
541 ! Support for rel and rev attributes in a tags added, use %Attr.AllowedRel
542   and %Attr.AllowedRev to activate
543 - You can define ID blacklists using regular expressions via
544   %Attr.IDBlacklistRegexp
545 - Error messages are emitted when you attempt to "allow" elements or
546   attributes that HTML Purifier does not support
547 - Fix segfault in unit test. The problem is not very reproduceable and
548   I don't know what causes it, but a six line patch fixed it.
550 1.5.0, released 2007-03-23
551 ! Added a rudimentary I18N and L10N system modeled off MediaWiki. It
552   doesn't actually do anything yet, but keep your eyes peeled.
553 ! docs/enduser-utf8.html explains how to use UTF-8 and HTML Purifier
554 ! Newly structured HTMLDefinition modeled off of XHTML 1.1 modules.
555   I am loathe to release beta quality APIs, but this is exactly that;
556   don't use the internal interfaces if you're not willing to do migration
557   later on.
558 - Allow 'x' subtag in language codes
559 - Fixed buggy chameleon-support for ins and del
560 . Added support for IDREF attributes (i.e. for)
561 . Renamed HTMLPurifier_AttrDef_Class to HTMLPurifier_AttrDef_Nmtokens
562 . Removed context variable ParentType, replaced with IsInline, which
563   is false when you're not inline and an integer of the parent that
564   caused you to become inline when you are (so possibly zero)
565 . Removed ElementDef->type in favor of ElementDef->descendants_are_inline
566   and HTMLDefinition->content_sets
567 . StrictBlockquote now reports what elements its supposed to allow,
568   rather than what it does allow
569 . Removed HTMLDefinition->info_flow_elements in favor of
570   HTMLDefinition->content_sets['Flow']
571 . Removed redundant "exclusionary" definitions from DTD roster
572 . StrictBlockquote now requires a construction parameter as if it
573   were an Required ChildDef, this is the "real" set of allowed elements
574 . AttrDef partitioned into HTML, CSS and URI segments
575 . Modify Youtube filter regexp to be multiline
576 . Require both PHP5 and DOM extension in order to use DOMLex, fixes
577   some edge cases where a DOMDocument class exists in a PHP4 environment
578   due to DOM XML extension.
580 1.4.1, released 2007-01-21
581 ! docs/enduser-youtube.html updated according to new functionality
582 - YouTube IDs can have underscores and dashes
584 1.4.0, released 2007-01-21
585 ! Implemented list-style-image, URIs now allowed in list-style
586 ! Implemented background-image, background-repeat, background-attachment
587   and background-position CSS properties. Shorthand property background
588   supports all of these properties.
589 ! Configuration documentation looks nicer
590 ! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode
591   characters while %Core.Encoding is set to a non-UTF-8 encoding.
592 ! Support for configuration directive aliases added
593 ! Config object can now be instantiated from ini files
594 ! YouTube preservation code added to the core, with two lines of code
595   you can add it as a filter to your code. See smoketests/preserveYouTube.php
596   for sample code.
597 ! Moved SLOW to docs/enduser-slow.html and added code examples
598 - Replaced version check with functionality check for DOM (thanks Stephen
599   Khoo)
600 . Added smoketest 'all.php', which loads all other smoketests via frames
601 . Implemented AttrDef_CSSURI for url(http://google.com) style declarations
602 . Added convenient single test selector form on test runner
604 1.3.2, released 2006-12-25
605 ! HTMLPurifier object now accepts configuration arrays, no need to manually
606   instantiate a configuration object
607 ! Context object now accessible to outside
608 ! Added enduser-youtube.html, explains how to embed YouTube videos. See
609   also corresponding smoketest preserveYouTube.php.
610 ! Added purifyArray(), which takes a list of HTML and purifies it all
611 ! Added static member variable $version to HTML Purifier with PHP-compatible
612   version number string.
613 - Fixed fatal error thrown by upper-cased language attributes
614 - printDefinition.php: added labels, added better clarification
615 . HTMLPurifier_Config::create() added, takes mixed variable and converts into
616   a HTMLPurifier_Config object.
618 1.3.1, released 2006-12-06
619 ! Added HTMLPurifier.func.php stub for a convenient function to call the library
620 - Fixed bug in RemoveInvalidImg code that caused all images to be dropped
621   (thanks to .mario for reporting this)
622 . Standardized all attribute handling variables to attr, made it plural
624 1.3.0, released 2006-11-26
625 # Invalid images are now removed, rather than replaced with a dud
626   <img src="" alt="Invalid image" />. Previous behavior can be restored
627   with new directive %Core.RemoveInvalidImg set to false.
628 ! (X)HTML Strict now supported
629   + Transparently handles inline elements in block context (blockquote)
630 ! Added GET method to demo for easier validation, added 50kb max input size
631 ! New directive %HTML.BlockWrapper, for block-ifying inline elements
632 ! New directive %HTML.Parent, allows you to only allow inline content
633 ! New directives %HTML.AllowedElements and %HTML.AllowedAttributes to let
634   users narrow the set of allowed tags
635 ! <li value="4"> and <ul start="2"> now allowed in loose mode
636 ! New directives %URI.DisableExternalResources and %URI.DisableResources
637 ! New directive %Attr.DisableURI, which eliminates all hyperlinking
638 ! New directive %URI.Munge, munges URI so you can use some sort of redirector
639   service to avoid PageRank leaks or warn users that they are exiting your site.
640 ! Added spiffy new smoketest printDefinition.php, which lets you twiddle with
641   the configuration settings and see how the internal rules are affected.
642 ! New directive %URI.HostBlacklist for blocking links to bad hosts.
643   xssAttacks.php smoketest updated accordingly.
644 - Added missing type to ChildDef_Chameleon
645 - Remove Tidy option from demo if there is not Tidy available
646 . ChildDef_Required guards against empty tags
647 . Lookup table HTMLDefinition->info_flow_elements added
648 . Added peace-of-mind variable initialization to Strategy_FixNesting
649 . Added HTMLPurifier->info_parent_def, parent child processing made special
650 . Added internal documents briefly summarizing future progression of HTML
651 . HTMLPurifier_Config->getBatch($namespace) added
652 . More lenient casting to bool from string in HTMLPurifier_ConfigSchema
653 . Refactored ChildDef classes into their own files
655 1.2.0, released 2006-11-19
656 # ID attributes now disabled by default. New directives:
657   + %HTML.EnableAttrID - restores old behavior by allowing IDs
658   + %Attr.IDPrefix - %Attr.IDBlacklist alternative that munges all user IDs
659     so that they don't collide with your IDs
660   + %Attr.IDPrefixLocal - Same as above, but for when there are multiple
661     instances of user content on the page
662   + Profuse documentation on how to use these available in docs/enduser-id.txt
663 ! Added MODx plugin <http://modxcms.com/forums/index.php/topic,6604.0.html>
664 ! Added percent encoding normalization
665 ! XSS attacks smoketest given facelift
666 ! Configuration documentation now has table of contents
667 ! Added %URI.DisableExternal, which prevents links to external websites.  You
668   can also use %URI.Host to permit absolute linking to subdomains
669 ! Non-accessible resources (ex. mailto) blocked from embedded URIs (img src)
670 - Type variable in HTMLDefinition was not being set properly, fixed
671 - Documentation updated
672   + TODO added request Phalanger
673   + TODO added request Native compression
674   + TODO added request Remove redundant tags
675   + TODO added possible plaintext formatter for HTML Purifier documentation
676   + Updated ConfigDoc TODO
677   + Improved inline comments in AttrDef/Class.php, AttrDef/CSS.php
678     and AttrDef/Host.php
679   + Revamped documentation into HTML, along with misc updates
680 - HTMLPurifier_Context doesn't throw a variable reference error if you attempt
681   to retrieve a non-existent variable
682 . Switched to purify()-wide Context object registry
683 . Refactored unit tests to minimize duplication
684 . XSS attack sheet updated
685 . configdoc.xml now has xml:space attached to default value nodes
686 . Allow configuration directives to permit null values
687 . Cleaned up test-cases to remove unnecessary swallowErrors()
689 1.1.2, released 2006-09-30
690 ! Add HTMLPurifier.auto.php stub file that configures include_path
691 - Documentation updated
692   + INSTALL document rewritten
693   + TODO added semi-lossy conversion
694   + API Doxygen docs' file exclusions updated
695   + Added notes on HTML versus XML attribute whitespace handling
696   + Noted that HTMLPurifier_ChildDef_Custom isn't being used
697   + Noted that config object's definitions are cached versions
698 - Fixed lack of attribute parsing in HTMLPurifier_Lexer_PEARSax3
699 - ftp:// URIs now have their typecodes checked
700 - Hooked up HTMLPurifier_ChildDef_Custom's unit tests (they weren't being run)
701 . Line endings standardized throughout project (svn:eol-style standardized)
702 . Refactored parseData() to general Lexer class
703 . Tester named "HTML Purifier" not "HTMLPurifier"
705 1.1.1, released 2006-09-24
706 ! Configuration option to optionally Tidy up output for indentation to make up
707   for dropped whitespace by DOMLex (pretty-printing for the entire application
708   should be done by a page-wide Tidy)
709 - Various documentation updates
710 - Fixed parse error in configuration documentation script
711 - Fixed fatal error in benchmark scripts, slightly augmented
712 - As far as possible, whitespace is preserved in-between table children
713 - Sample test-settings.php file included
715 1.1.0, released 2006-09-16
716 ! Directive documentation generation using XSLT
717 ! XHTML can now be turned off, output becomes <br>
718 - Made URI validator more forgiving: will ignore leading and trailing
719   quotes, apostrophes and less than or greater than signs.
720 - Enforce alphanumeric namespace and directive names for configuration.
721 - Table child definition made more flexible, will fix up poorly ordered elements
722 . Renamed ConfigDef to ConfigSchema
724 1.0.1, released 2006-09-04
725 - Fixed slight bug in DOMLex attribute parsing
726 - Fixed rejection of case-insensitive configuration values when there is a
727   set of allowed values.  This manifested in %Core.Encoding.
728 - Fixed rejection of inline style declarations that had lots of extra
729   space in them.  This manifested in TinyMCE.
731 1.0.0, released 2006-09-01
732 ! Shorthand CSS properties implemented: font, border, background, list-style
733 ! Basic color keywords translated into hexadecimal values
734 ! Table CSS properties implemented
735 ! Support for charsets other than UTF-8 (defined by iconv)
736 ! Malformed UTF-8 and non-SGML character detection and cleaning implemented
737 - Fixed broken numeric entity conversion
738 - API documentation completed
739 . (HTML|CSS)Definition de-singleton-ized
741 1.0.0beta, released 2006-08-16
742 ! First public release, most functionality implemented. Notable omissions are:
743   + Shorthand CSS properties
744   + Table CSS properties
745   + Deprecated attribute transformations