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