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