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