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