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