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