Add install script for PEAR installs.
[htmlpurifier/bfroehle.git] / NEWS
bloba28f0f77af22507137554a53db995dd5c570239a
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 2.1.2, unknown release date
13 ! Implemented Object module for trusted users
14 ! Implemented experimental HTML5 parsing mode using PH5P. To use, add
15   this to your code:
16         require_once 'HTMLPurifier/Lexer/PH5P.php';
17         $config->set('Core', 'LexerImpl', PH5P');
18   Note that this Lexer introduces some classes not in the HTMLPurifier
19   namespace.  Also, this is PHP5 only.
20 - Fix non-visible parsing error in DirectLex with empty tags that have
21   slashes inside attribute values.
22 - Fix typo in CSS definition: border-collapse:seperate; was incorrectly
23   accepted as valid CSS. Usually non-visible, because this styling is the
24   default for tables in most browsers. Thanks Brett Zamir for pointing
25   this out.
26 - Fix validation errors in configuration form
27 . Unit test refactoring for one logical test per test function
28 . Config and context parameters in ComplexHarness deprecated: instead, edit
29   the $config and $context member variables
30 . HTML wrapper in DOMLex now takes DTD identifiers into account; doesn't
31   really make a difference, but is good for completeness sake
33 2.1.1, released 2007-08-04
34 - Fix show-stopper bug in %URI.MakeAbsolute functionality
35 - Fix PHP4 syntax error in standalone version
36 . Add prefix directory to include path for standalone, this prevents
37   other installations from clobbering the standalone's URI schemes
38 . Single test methods can be invoked by prefixing with __only
40 2.1.0, released 2007-08-02
41 # flush-htmldefinition-cache.php superseded in favor of a generic
42   flush-definition-cache.php script, you can clear a specific cache
43   by passing its name as a parameter to the script
44 ! Phorum mod implemented for HTML Purifier
45 ! With %Core.AggressivelyFixLt, <3 and similar emoticons no longer
46   trigger HTML removal in PHP5 (DOMLex). This directive is not necessary
47   for PHP4 (DirectLex).
48 ! Standalone file now available, which greatly reduces the amount of
49   includes (although there are still a few files that reside in the
50   standalone folder)
51 ! Relative URIs can now be transformed into their absolute equivalents
52   using %URI.Base and %URI.MakeAbsolute
53 ! Ruby implemented for XHTML 1.1
54 ! You can now define custom URI filtering behavior, see enduser-uri-filter.html
55   for more details
56 ! UTF-8 font names now supported in CSS
57 - AutoFormatters emit friendly error messages if tags or attributes they
58   need are not allowed
59 - ConfigForm's compactification of directive names is now configurable
60 - AutoParagraph autoformatter algorithm refined after field-testing
61 - XHTML 1.1 now applies XHTML 1.0 Strict cleanup routines, namely
62   blockquote wrapping
63 - Contents of <style> tags removed by default when tags are removed
64 . HTMLPurifier_Config->getSerial() implemented, this is extremely useful
65   for output cache invalidation
66 . ConfigForm printer now can retrieve CSS and JS files as strings, in
67   case HTML Purifier's directory is not publically accessible
68 . Introduce new text/itext configuration directive values: these represent
69   longer strings that would be more appropriately edited with a textarea
70 . Allow newlines to act as separators for lists, hashes, lookups and
71   %HTML.Allowed
72 . ConfigForm generates textareas instead of text inputs for lists, hashes,
73   lookups, text and itext fields
74 . Hidden element content removal genericized: %Core.HiddenElements can
75   be used to customize this behavior, by default <script> and <style> are
76   hidden
77 . Added HTMLPURIFIER_PREFIX constant, should be used instead of dirname(__FILE__)
78 . Custom ChildDef added to default include list
79 . URIScheme reflection improved: will not attempt to include file if class
80   already exists. May clobber autoload, so I need to keep an eye on it
81 . ConfigSchema heavily optimized, will only collect information and validate
82   definitions when HTMLPURIFIER_SCHEMA_STRICT is true.
83 . AttrDef_URI unit tests and implementation refactored
84 . benchmarks/ directory now protected from public view with .htaccess file;
85   run the tests via command line
86 . URI scheme is munged off if there is no authority and the scheme is the
87   default one
88 . All unit tests inherit from HTMLPurifier_Harness, not UnitTestCase
89 . Interface for URIScheme changed
90 . Generic URI object to hold components of URI added, most systems involved
91   in URI validation have been migrated to use it
92 . Custom filtering for URIs factored out to URIDefinition interface for
93   maximum extensibility
95 2.0.1, released 2007-06-27
96 ! Tag auto-closing now based on a ChildDef heuristic rather than a
97   manually set auto_close array; some behavior may change
98 ! Experimental AutoFormat functionality added: auto-paragraph and
99   linkify your HTML input by setting %AutoFormat.AutoParagraph and
100   %AutoFormat.Linkify to true
101 ! Newlines normalized internally, and then converted back to the
102   value of PHP_EOL. If this is not desired, set your newline format
103   using %Output.Newline.
104 ! Beta error collection, messages are implemented for the most generic
105   cases involving Lexing or Strategies
106 - Clean up special case code for <script> tags
107 - Reorder includes for DefinitionCache decorators, fixes a possible
108   missing class error
109 - Fixed bug where manually modified definitions were not saved via cache
110   (mostly harmless, except for the fact that it would be a little slower)
111 - Configuration objects with different serials do not clobber each
112   others when revision numbers are unequal
113 - Improve Serializer DefinitionCache directory permissions checks
114 - DefinitionCache no longer throws errors when it encounters old
115   serial files that do not conform to the current style
116 - Stray xmlns attributes removed from configuration documentation
117 - configForm.php smoketest no longer has XSS vulnerability due to
118   unescaped print_r output
119 - Printer adheres to configuration's directives on output format
120 - Fix improperly named form field in ConfigForm printer
121 . Rewire some test-cases to swallow errors rather than expect them
122 . HTMLDefinition printer updated with some of the new attributes
123 . DefinitionCache keys reordered to reflect precedence: version number,
124   hash, then revision number
125 . %Core.DefinitionCache renamed to %Cache.DefinitionImpl
126 . Interlinking in configuration documentation added using
127   Injector_PurifierLinkify
128 . Directives now keep track of aliases to themselves
129 . Error collector now requires a severity to be passed, use PHP's internal
130   error constants for this
131 . HTMLPurifier_Config::getAllowedDirectivesForForm implemented, allows
132   much easier selective embedding of configuration values
133 . Doctype objects now accept public and system DTD identifiers
134 . %HTML.Doctype is now constrained by specific values, to specify a custom
135   doctype use new %HTML.CustomDoctype
136 . ConfigForm truncates long directives to keep the form small, and does
137   not re-output namespaces
139 2.0.0, released 2007-06-20
140 # Completely refactored HTMLModuleManager, decentralizing safety
141   information
142 # Transform modules changed to Tidy modules, which offer more flexibility
143   and better modularization
144 # Configuration object now finalizes itself when a read operation is
145   performed on it, ensuring that its internal state stays consistent.
146   To revert this behavior, you can set the $autoFinalize member variable 
147   off, but it's not recommended.
148 # New compact syntax for AttrDef objects that can be used to instantiate
149   new objects via make()
150 # Definitions (esp. HTMLDefinition) are now cached for a significant
151   performance boost. You can disable caching by setting %Core.DefinitionCache
152   to null. You CANNOT edit raw definitions without setting the corresponding
153   DefinitionID directive (%HTML.DefinitionID for HTMLDefinition).
154 # Contents between <script> tags are now completely removed if <script>
155   is not allowed
156 # Prototype-declarations for Lexer removed in favor of configuration
157   determination of Lexer implementations.
158 ! HTML Purifier now works in PHP 4.3.2.
159 ! Configuration form-editing API makes tweaking HTMLPurifier_Config a
160   breeze!
161 ! Configuration directives that accept hashes now allow new string
162   format: key1:value1,key2:value2
163 ! ConfigDoc now factored into OOP design
164 ! All deprecated elements now natively supported
165 ! Implement TinyMCE styled whitelist specification format in
166   %HTML.Allowed
167 ! Config object gives more friendly error messages when things go wrong
168 ! Advanced API implemented: easy functions for creating elements (addElement)
169   and attributes (addAttribute) on HTMLDefinition
170 ! Add native support for required attributes
171 - Deprecated and removed EnableRedundantUTF8Cleaning. It didn't even work!
172 - DOMLex will not emit errors when a custom error handler that does not
173   honor error_reporting is used
174 - StrictBlockquote child definition refrains from wrapping whitespace
175   in tags now.
176 - Bug resulting from tag transforms to non-allowed elements fixed
177 - ChildDef_Custom's regex generation has been improved, removing several
178   false positives
179 . Unit test for ElementDef created, ElementDef behavior modified to
180   be more flexible
181 . Added convenience functions for HTMLModule constructors
182 . AttrTypes now has accessor functions that should be used instead
183   of directly manipulating info
184 . TagTransform_Center deprecated in favor of generic TagTransform_Simple
185 . Add extra protection in AttrDef_URI against phantom Schemes
186 . Doctype object added to HTMLDefinition which describes certain aspects
187   of the operational document type
188 . Lexer is now pre-emptively included, with a conditional include for the
189   PHP5 only version.
190 . HTMLDefinition and CSSDefinition have a common parent class: Definition.
191 . DirectLex can now track line-numbers
192 . Preliminary error collector is in place, although no code actually reports
193   errors yet
194 . Factor out most of ValidateAttributes to new AttrValidator class
196 1.6.1, released 2007-05-05
197 ! Support for more deprecated attributes via transformations:
198   + hspace and vspace in img
199   + size and noshade in hr
200   + nowrap in td
201   + clear in br
202   + align in caption, table, img and hr
203   + type in ul, ol and li
204 ! DirectLex now preserves text in which a < bracket is followed by
205   a non-alphanumeric character. This means that certain emoticons
206   are now preserved.
207 ! %Core.RemoveInvalidImg is now operational, when set to false invalid
208   images will hang around with an empty src
209 ! target attribute in a tag supported, use %Attr.AllowedFrameTargets
210   to enable
211 ! CSS property white-space now allows nowrap (supported in all modern
212   browsers) but not others (which have spotty browser implementations)
213 ! XHTML 1.1 mode now sort-of works without any fatal errors, and
214   lang is now moved over to xml:lang.
215 ! Attribute transformation smoketest available at smoketests/attrTransform.php
216 ! Transformation of font's size attribute now handles super-large numbers
217 - Possibly fatal bug with __autoload() fixed in module manager
218 - Invert HTMLModuleManager->addModule() processing order to check
219   prefixes first and then the literal module
220 - Empty strings get converted to empty arrays instead of arrays with
221   an empty string in them.
222 - Merging in attribute lists now works.
223 . Demo script removed: it has been added to the website's repository
224 . Basic.php script modified to work out of the box
225 . Refactor AttrTransform classes to reduce duplication
226 . AttrTransform_TextAlign axed in favor of a more general
227   AttrTransform_EnumToCSS, refer to HTMLModule/TransformToStrict.php to
228   see how the new equivalent is implemented
229 . Unit tests now use exclusively assertIdentical
231 1.6.0, released 2007-04-01
232 ! Support for most common deprecated attributes via transformations:
233   + bgcolor in td, th, tr and table
234   + border in img
235   + name in a and img
236   + width in td, th and hr
237   + height in td, th
238 ! Support for CSS attribute 'height' added
239 ! Support for rel and rev attributes in a tags added, use %Attr.AllowedRel
240   and %Attr.AllowedRev to activate
241 - You can define ID blacklists using regular expressions via
242   %Attr.IDBlacklistRegexp
243 - Error messages are emitted when you attempt to "allow" elements or
244   attributes that HTML Purifier does not support
245 - Fix segfault in unit test. The problem is not very reproduceable and
246   I don't know what causes it, but a six line patch fixed it.
248 1.5.0, released 2007-03-23
249 ! Added a rudimentary I18N and L10N system modeled off MediaWiki. It
250   doesn't actually do anything yet, but keep your eyes peeled.
251 ! docs/enduser-utf8.html explains how to use UTF-8 and HTML Purifier
252 ! Newly structured HTMLDefinition modeled off of XHTML 1.1 modules.
253   I am loathe to release beta quality APIs, but this is exactly that;
254   don't use the internal interfaces if you're not willing to do migration
255   later on.
256 - Allow 'x' subtag in language codes
257 - Fixed buggy chameleon-support for ins and del
258 . Added support for IDREF attributes (i.e. for)
259 . Renamed HTMLPurifier_AttrDef_Class to HTMLPurifier_AttrDef_Nmtokens
260 . Removed context variable ParentType, replaced with IsInline, which
261   is false when you're not inline and an integer of the parent that
262   caused you to become inline when you are (so possibly zero)
263 . Removed ElementDef->type in favor of ElementDef->descendants_are_inline
264   and HTMLDefinition->content_sets
265 . StrictBlockquote now reports what elements its supposed to allow,
266   rather than what it does allow
267 . Removed HTMLDefinition->info_flow_elements in favor of
268   HTMLDefinition->content_sets['Flow']
269 . Removed redundant "exclusionary" definitions from DTD roster
270 . StrictBlockquote now requires a construction parameter as if it
271   were an Required ChildDef, this is the "real" set of allowed elements
272 . AttrDef partitioned into HTML, CSS and URI segments
273 . Modify Youtube filter regexp to be multiline
274 . Require both PHP5 and DOM extension in order to use DOMLex, fixes
275   some edge cases where a DOMDocument class exists in a PHP4 environment
276   due to DOM XML extension.
278 1.4.1, released 2007-01-21
279 ! docs/enduser-youtube.html updated according to new functionality
280 - YouTube IDs can have underscores and dashes
282 1.4.0, released 2007-01-21
283 ! Implemented list-style-image, URIs now allowed in list-style
284 ! Implemented background-image, background-repeat, background-attachment
285   and background-position CSS properties. Shorthand property background
286   supports all of these properties.
287 ! Configuration documentation looks nicer
288 ! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode
289   characters while %Core.Encoding is set to a non-UTF-8 encoding.
290 ! Support for configuration directive aliases added
291 ! Config object can now be instantiated from ini files
292 ! YouTube preservation code added to the core, with two lines of code
293   you can add it as a filter to your code. See smoketests/preserveYouTube.php
294   for sample code.
295 ! Moved SLOW to docs/enduser-slow.html and added code examples
296 - Replaced version check with functionality check for DOM (thanks Stephen
297   Khoo)
298 . Added smoketest 'all.php', which loads all other smoketests via frames
299 . Implemented AttrDef_CSSURI for url(http://google.com) style declarations
300 . Added convenient single test selector form on test runner
302 1.3.2, released 2006-12-25
303 ! HTMLPurifier object now accepts configuration arrays, no need to manually
304   instantiate a configuration object
305 ! Context object now accessible to outside
306 ! Added enduser-youtube.html, explains how to embed YouTube videos. See
307   also corresponding smoketest preserveYouTube.php.
308 ! Added purifyArray(), which takes a list of HTML and purifies it all
309 ! Added static member variable $version to HTML Purifier with PHP-compatible
310   version number string.
311 - Fixed fatal error thrown by upper-cased language attributes
312 - printDefinition.php: added labels, added better clarification
313 . HTMLPurifier_Config::create() added, takes mixed variable and converts into
314   a HTMLPurifier_Config object.
316 1.3.1, released 2006-12-06
317 ! Added HTMLPurifier.func.php stub for a convenient function to call the library
318 - Fixed bug in RemoveInvalidImg code that caused all images to be dropped
319   (thanks to .mario for reporting this)
320 . Standardized all attribute handling variables to attr, made it plural
322 1.3.0, released 2006-11-26
323 # Invalid images are now removed, rather than replaced with a dud
324   <img src="" alt="Invalid image" />. Previous behavior can be restored
325   with new directive %Core.RemoveInvalidImg set to false.
326 ! (X)HTML Strict now supported
327   + Transparently handles inline elements in block context (blockquote)
328 ! Added GET method to demo for easier validation, added 50kb max input size
329 ! New directive %HTML.BlockWrapper, for block-ifying inline elements
330 ! New directive %HTML.Parent, allows you to only allow inline content
331 ! New directives %HTML.AllowedElements and %HTML.AllowedAttributes to let
332   users narrow the set of allowed tags
333 ! <li value="4"> and <ul start="2"> now allowed in loose mode
334 ! New directives %URI.DisableExternalResources and %URI.DisableResources
335 ! New directive %Attr.DisableURI, which eliminates all hyperlinking
336 ! New directive %URI.Munge, munges URI so you can use some sort of redirector
337   service to avoid PageRank leaks or warn users that they are exiting your site.
338 ! Added spiffy new smoketest printDefinition.php, which lets you twiddle with
339   the configuration settings and see how the internal rules are affected.
340 ! New directive %URI.HostBlacklist for blocking links to bad hosts.
341   xssAttacks.php smoketest updated accordingly.
342 - Added missing type to ChildDef_Chameleon
343 - Remove Tidy option from demo if there is not Tidy available
344 . ChildDef_Required guards against empty tags
345 . Lookup table HTMLDefinition->info_flow_elements added
346 . Added peace-of-mind variable initialization to Strategy_FixNesting
347 . Added HTMLPurifier->info_parent_def, parent child processing made special
348 . Added internal documents briefly summarizing future progression of HTML
349 . HTMLPurifier_Config->getBatch($namespace) added
350 . More lenient casting to bool from string in HTMLPurifier_ConfigSchema
351 . Refactored ChildDef classes into their own files
353 1.2.0, released 2006-11-19
354 # ID attributes now disabled by default. New directives:
355   + %HTML.EnableAttrID - restores old behavior by allowing IDs
356   + %Attr.IDPrefix - %Attr.IDBlacklist alternative that munges all user IDs
357     so that they don't collide with your IDs
358   + %Attr.IDPrefixLocal - Same as above, but for when there are multiple
359     instances of user content on the page
360   + Profuse documentation on how to use these available in docs/enduser-id.txt
361 ! Added MODx plugin <http://modxcms.com/forums/index.php/topic,6604.0.html>
362 ! Added percent encoding normalization
363 ! XSS attacks smoketest given facelift
364 ! Configuration documentation now has table of contents
365 ! Added %URI.DisableExternal, which prevents links to external websites.  You
366   can also use %URI.Host to permit absolute linking to subdomains
367 ! Non-accessible resources (ex. mailto) blocked from embedded URIs (img src)
368 - Type variable in HTMLDefinition was not being set properly, fixed
369 - Documentation updated
370   + TODO added request Phalanger
371   + TODO added request Native compression
372   + TODO added request Remove redundant tags
373   + TODO added possible plaintext formatter for HTML Purifier documentation
374   + Updated ConfigDoc TODO
375   + Improved inline comments in AttrDef/Class.php, AttrDef/CSS.php
376     and AttrDef/Host.php
377   + Revamped documentation into HTML, along with misc updates
378 - HTMLPurifier_Context doesn't throw a variable reference error if you attempt
379   to retrieve a non-existent variable
380 . Switched to purify()-wide Context object registry
381 . Refactored unit tests to minimize duplication
382 . XSS attack sheet updated
383 . configdoc.xml now has xml:space attached to default value nodes
384 . Allow configuration directives to permit null values
385 . Cleaned up test-cases to remove unnecessary swallowErrors()
387 1.1.2, released 2006-09-30
388 ! Add HTMLPurifier.auto.php stub file that configures include_path
389 - Documentation updated
390   + INSTALL document rewritten
391   + TODO added semi-lossy conversion
392   + API Doxygen docs' file exclusions updated
393   + Added notes on HTML versus XML attribute whitespace handling
394   + Noted that HTMLPurifier_ChildDef_Custom isn't being used
395   + Noted that config object's definitions are cached versions
396 - Fixed lack of attribute parsing in HTMLPurifier_Lexer_PEARSax3
397 - ftp:// URIs now have their typecodes checked
398 - Hooked up HTMLPurifier_ChildDef_Custom's unit tests (they weren't being run)
399 . Line endings standardized throughout project (svn:eol-style standardized)
400 . Refactored parseData() to general Lexer class
401 . Tester named "HTML Purifier" not "HTMLPurifier"
403 1.1.1, released 2006-09-24
404 ! Configuration option to optionally Tidy up output for indentation to make up
405   for dropped whitespace by DOMLex (pretty-printing for the entire application
406   should be done by a page-wide Tidy)
407 - Various documentation updates
408 - Fixed parse error in configuration documentation script
409 - Fixed fatal error in benchmark scripts, slightly augmented
410 - As far as possible, whitespace is preserved in-between table children
411 - Sample test-settings.php file included
413 1.1.0, released 2006-09-16
414 ! Directive documentation generation using XSLT
415 ! XHTML can now be turned off, output becomes <br>
416 - Made URI validator more forgiving: will ignore leading and trailing
417   quotes, apostrophes and less than or greater than signs.
418 - Enforce alphanumeric namespace and directive names for configuration.
419 - Table child definition made more flexible, will fix up poorly ordered elements
420 . Renamed ConfigDef to ConfigSchema
422 1.0.1, released 2006-09-04
423 - Fixed slight bug in DOMLex attribute parsing
424 - Fixed rejection of case-insensitive configuration values when there is a
425   set of allowed values.  This manifested in %Core.Encoding.
426 - Fixed rejection of inline style declarations that had lots of extra
427   space in them.  This manifested in TinyMCE.
429 1.0.0, released 2006-09-01
430 ! Shorthand CSS properties implemented: font, border, background, list-style
431 ! Basic color keywords translated into hexadecimal values
432 ! Table CSS properties implemented
433 ! Support for charsets other than UTF-8 (defined by iconv)
434 ! Malformed UTF-8 and non-SGML character detection and cleaning implemented
435 - Fixed broken numeric entity conversion
436 - API documentation completed
437 . (HTML|CSS)Definition de-singleton-ized
439 1.0.0beta, released 2006-08-16
440 ! First public release, most functionality implemented. Notable omissions are:
441   + Shorthand CSS properties
442   + Table CSS properties
443   + Deprecated attribute transformations