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