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