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