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