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