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