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