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