NEWS 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  1. NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
  2. |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  3. = KEY ====================
  4. # Breaks back-compat
  5. ! Feature
  6. - Bugfix
  7. + Sub-comment
  8. . Internal change
  9. ==========================
  10. 4.11.0, released 2019-07-14
  11. # SafeScripting now matches case-sensitively against its whitelist (previously it was
  12. case-insensitive.) Thanks Dimitri Gritsajuk <gritsajuk.dimitri@gmail.com>
  13. for reporting.
  14. ! New directive %Core.AllowParseManyTags which allows parsing of many nested tags.
  15. Thanks M. Suzuki <msuzuki1986@gmail.com> for contributing the patch.
  16. ! purifyArray now supports multidimensional arrays. Thanks
  17. Sandro Miguel Marques <sandromiguel@sandromiguel.com> for contributing this patch.
  18. ! initial and inherit settings available for width, height, and the min-/max-
  19. versions thereof. Thanks Michael Kliewe <info@phpgansta.de> for contributing
  20. this patch.
  21. ! More color names are supported. Thanks Daijobou for contributing.
  22. - Compatibility fixes for PHP 7.3, including new CI for PHP 7.3
  23. (thank you Lukas Neumann <lksnmnn@gmail.com>) and removal of
  24. reserved words in our constants (thanks Darko Hrgovic <darko@darkodev.com>
  25. - Compatibility fixes for HHVM. Thanks Mateusz Turcza for contributing
  26. this fix.
  27. - HTML Purifier now never defines __autoload, fixing #196. Thanks
  28. Michael Kliewe for reporting.
  29. - In some situations, Config.php would report an undefined index: class
  30. error; this has been fixed. Thanks DiLong Fa for contributing
  31. this fix.
  32. - We no longer produce <script /> tags; we always explicitly write
  33. out the open and close tag. Thanks Dimitri Gritsajuk
  34. <gritsajuk.dimitri@gmail.com> for contributing this fix.
  35. - Better compatibility when IDNA constants are not present. Thanks
  36. Mateusz Turcza <xemlock@gmail.com> for contributing this fix.
  37. 4.10.0, released 2018-02-22
  38. # PHP 5.3 is no longer officially supported by HTML Purifier
  39. (we did not specifically break support, but we are no longer
  40. testing on PHP 5.3)
  41. ! Relative CSS length units are now supported
  42. - A few PHP 7.2 compatibility fixes, thanks John Flatness
  43. <john@zerocrates.org>
  44. - Improve portability with old versions of libxml which don't
  45. support accessing the data of a node
  46. - IDNA2008 is now used for converting domains to ASCII, fixing
  47. some rather strange bugs with international domains
  48. - Fix race condition resulting in E_WARNING when creating
  49. directories with Serializer
  50. 4.9.3, released 2017-06-02
  51. - Workaround PHP 7.1 infinite loop when opcode cache is enabled.
  52. Thanks @Xiphin (#134, #135)
  53. - Don't use autoloader when testing for DOMDocument. Hypothetically,
  54. this could cause your install to start using DirectLex if you had
  55. previously been monkeypatching in a custom, autoloaded implementation
  56. of DOMDocument. Don't do that. Thanks @Izumi-kun (#130)
  57. 4.9.2, released 2017-03-12
  58. - Fixes PHP 5.3 compatibility
  59. - Fix breakage when decoding decimal entities. Thanks @rybakit (#129)
  60. 4.9.1, released 2017-03-08
  61. ! %URI.DefaultScheme can now be set to null, in which case
  62. all relative paths are removed.
  63. ! New CSS properties: min-width, max-width, min-height, max-height (#94)
  64. ! Transparency (rgba) and hsl/hsla supported where color CSS is present.
  65. Thanks @fxbt for contributing the patch. (#118)
  66. - When idn_to_ascii is defined, we might accept malformed
  67. hostnames. Apply validation to the result in such cases.
  68. - Close directory when done in Serializer DefinitionCache (#100)
  69. - Deleted some asserts to avoid linters from choking (#97)
  70. - Rework Serializer cache behavior to avoid chmod'ing if possible (#32)
  71. - Embedded semicolons in strings in CSS are now handled correctly!
  72. - We accidentally dropped certain Unicode characters if there was
  73. one or more invalid characters. This has been fixed, thanks
  74. to mpyw <ryosuke_i_628@yahoo.co.jp>
  75. - Fix for "Don't truncate upon encountering </div> when using DOMLex"
  76. caused a regression with HTML 4.01 Strict parsing with libxml 2.9.1
  77. (and maybe later versions, but known OK with libxml 2.9.4). The
  78. fix is to go about handling truncation a bit more cleverly so that
  79. we can wrap with divs (sidestepping the bug) but slurping out the
  80. rest of the text in case it ran off the end. (#78)
  81. - Fix PREG_BACKTRACK_LIMIT_ERROR in HTMLPurifier_Filter_ExtractStyle.
  82. Thanks @breathbath for contributing the report and fix (#120)
  83. - Fix entity decoding algorithm to be more conservative about
  84. decoding entities that are missing trailing semicolon.
  85. To get old behavior, set %Core.LegacyEntityDecoder to true.
  86. (#119)
  87. - Workaround libxml bug when HTML tags are embedded inside
  88. script tags. To disable workaround set %Core.AggressivelyRemoveScript
  89. to false. (#83)
  90. # By default, when a link has a target attribute associated
  91. with it, we now also add rel="noopener" in order to
  92. prevent the new window from being able to overwrite
  93. the original frame. To disable this protection,
  94. set %HTML.TargetNoopener to FALSE.
  95. 4.9.0 was cut on Git but never properly released; when we did the
  96. real release we decided to skip this version number.
  97. 4.8.0, released 2016-07-16
  98. # By default, when a link has a target attribute associated
  99. with it, we now also add rel="noreferrer" in order to
  100. prevent the new window from being able to overwrite
  101. the original frame. To disable this protection,
  102. set %HTML.TargetNoreferrer to FALSE.
  103. ! Full PHP 7 compatibility, the test suite is ALL GO.
  104. ! %CSS.AllowDuplicates permits duplicate CSS properties.
  105. ! Support for 'tel' URIs.
  106. ! Partial support for 'border-radius' properties when %CSS.AllowProprietary is true.
  107. The slash syntax, i.e., 'border-radius: 2em 1em 4em / 0.5em 3em' is not
  108. yet supported.
  109. ! %Attr.ID.HTML5 turns on HTML5-style ID handling.
  110. - alt truncation could result in malformed UTF-8 sequence. Don't
  111. truncate. Thanks Brandon Farber for reporting.
  112. - Linkify regex is smarter, based off of Gruber's regex.
  113. - IDNA supported natively on PHP 5.3 and later.
  114. - Non all-numeric top-level names (e.g., foo.1f, 1f) are now
  115. allowed.
  116. - Minor bounds error fix to squash a PHP 7 notice.
  117. - Support non-/tmp temporary directories for data:// validation
  118. - Give a better error message when a user attempts to allow
  119. ul/ol without allowing li.
  120. - On some versions of PHP, the Serializer DefinitionCache could
  121. infinite loop when the directory exists but is not listable. (#49)
  122. - Don't match for <body> inside comments with
  123. %Core.ConvertDocumentToFragment. (#67)
  124. - SafeObject is now less case sensitive. (#57)
  125. - AutoFormat.RemoveEmpty.Predicate now correctly renders in
  126. web form. (#85)
  127. 4.7.0, released 2015-08-04
  128. # opacity is now considered a "tricky" CSS property rather than a
  129. proprietary one.
  130. ! %AutoFormat.RemoveEmpty.Predicate for specifying exactly when
  131. an element should be considered "empty" (maybe preserve if it
  132. has attributes), and modify iframe support so that the iframe
  133. is removed if it is missing a src attribute. Thanks meeva for
  134. reporting.
  135. - Don't truncate upon encountering </div> when using DOMLex. Thanks
  136. Myrto Christina for finally convincing me to fix this.
  137. - Update YouTube filter for new code.
  138. - Fix parsing of rgb() values with spaces in them for 'border'
  139. attribute.
  140. - Don't remove foo="" attributes if foo is a boolean attribute. Thanks
  141. valME for reporting.
  142. 4.6.0, released 2013-11-30
  143. # Secure URI munge hashing algorithm has changed to hash_hmac("sha256", $url, $secret).
  144. Please update any verification scripts you may have.
  145. # URI parsing algorithm was made more strict, so only prefixes which
  146. looks like schemes will actually be schemes. Thanks
  147. Michael Gusev <mgusev@sugarcrm.com> for fixing.
  148. # %Core.EscapeInvalidChildren is no longer supported, and no longer does
  149. anything.
  150. ! New directive %Core.AllowHostnameUnderscore which allows underscores
  151. in hostnames.
  152. - Eliminate quadratic behavior in DOMLex by using a proper queue.
  153. Thanks Ole Laursen for noticing this.
  154. - Rewritten MakeWellFormed/FixNesting implementation eliminates quadratic
  155. behavior in the rest of the purificaiton pipeline. Thanks Chedburn
  156. Networks for sponsoring this work.
  157. - Made Linkify URL parser a bit less permissive, so that non-breaking
  158. spaces and commas are not included as part of URL. Thanks nAS for fixing.
  159. - Fix some bad interactions with %HTML.Allowed and injectors. Thanks
  160. David Hirtz for reporting.
  161. - Fix infinite loop in DirectLex. Thanks Ashar Javed (@soaj1664ashar)
  162. for reporting.
  163. 4.5.0, released 2013-02-17
  164. # Fix bug where stacked attribute transforms clobber each other;
  165. this also means it's no longer possible to override attribute
  166. transforms in later modules. No internal code was using this
  167. but this may break some clients.
  168. # We now use SHA-1 to identify cached definitions, instead of MD5.
  169. ! Support display:inline-block
  170. ! Support for more white-space CSS values.
  171. ! Permit underscores in font families
  172. ! Support for page-break-* CSS3 properties when proprietary properties
  173. are enabled.
  174. ! New directive %Core.DisableExcludes; can be set to 'true' to turn off
  175. SGML excludes checking. If HTML Purifier is removing too much text
  176. and you don't care about full standards compliance, try setting this to
  177. 'true'.
  178. - Use prepend for SPL autoloading on PHP 5.3 and later.
  179. - Fix bug with nofollow transform when pre-existing rel exists.
  180. - Fix bug where background:url() always gets lower-cased
  181. (but not background-image:url())
  182. - Fix bug with non lower-case color names in HTML
  183. - Fix bug where data URI validation doesn't remove temporary files.
  184. Thanks Javier Marín Ros <javiermarinros@gmail.com> for reporting.
  185. - Don't remove certain empty tags on RemoveEmpty.
  186. 4.4.0, released 2012-01-18
  187. # Removed PEARSax3 handler.
  188. # URI.Munge now munges URIs inside the same host that go from https
  189. to http. Reported by Neike Taika-Tessaro.
  190. # Core.EscapeNonASCIICharacters now always transforms entities to
  191. entities, even if target encoding is UTF-8.
  192. # Tighten up selector validation in ExtractStyleBlocks.
  193. Non-syntactically valid selectors are now rejected, along with
  194. some of the more obscure ones such as attribute selectors, the
  195. :lang pseudoselector, and anything not in CSS2.1. Furthermore,
  196. ID and class selectors now work properly with the relevant
  197. configuration attributes. Also, mute errors when parsing CSS
  198. with CSS Tidy. Reported by Mario Heiderich and Norman Hippert.
  199. ! Added support for 'scope' attribute on tables.
  200. ! Added %HTML.TargetBlank, which adds target="blank" to all outgoing links.
  201. ! Properly handle sub-lists directly nested inside of lists in
  202. a standards compliant way, by moving them into the preceding <li>
  203. ! Added %HTML.AllowedComments and %HTML.AllowedCommentsRegexp for
  204. limited allowed comments in untrusted situations.
  205. ! Implement iframes, and allow them to be used in untrusted mode with
  206. %HTML.SafeIframe and %URI.SafeIframeRegexp. Thanks Bradley M. Froehle
  207. <brad.froehle@gmail.com> for submitting an initial version of the patch.
  208. ! The Forms module now works properly for transitional doctypes.
  209. ! Added support for internationalized domain names. You need the PEAR
  210. Net_IDNA2 module to be in your path; if it is installed, ensure the
  211. class can be loaded and then set %Core.EnableIDNA to true.
  212. - Color keywords are now case insensitive. Thanks Yzmir Ramirez
  213. <yramirez-htmlpurifier@adicio.com> for reporting.
  214. - Explicitly initialize anonModule variable to null.
  215. - Do not duplicate nofollow if already present. Thanks 178
  216. for reporting.
  217. - Do not add nofollow if hostname matches our current host. Thanks 178
  218. for reporting, and Neike Taika-Tessaro for helping diagnose.
  219. - Do not unset parser variable; this fixes intermittent serialization
  220. problems. Thanks Neike Taika-Tessaro for reporting, bill
  221. <10010tiger@gmail.com> for diagnosing.
  222. - Fix iconv truncation bug, where non-UTF-8 target encodings see
  223. output truncated after around 8000 characters. Thanks Jörg Ludwig
  224. <joerg.ludwig@iserv.eu> for reporting.
  225. - Fix broken table content model for XHTML1.1 (and also earlier
  226. versions, although the W3C validator doesn't catch those violations).
  227. Thanks GlitchMr <glitch.mr@gmail.com> for reporting.
  228. 4.3.0, released 2011-03-27
  229. # Fixed broken caching of customized raw definitions, but requires an
  230. API change. The old API still works but will emit a warning,
  231. see http://htmlpurifier.org/docs/enduser-customize.html#optimized
  232. for how to upgrade your code.
  233. # Protect against Internet Explorer innerHTML behavior by specially
  234. treating attributes with backticks but no angled brackets, quotes or
  235. spaces. This constitutes a slight semantic change, which can be
  236. reverted using %Output.FixInnerHTML. Reported by Neike Taika-Tessaro
  237. and Mario Heiderich.
  238. # Protect against cssText/innerHTML by restricting allowed characters
  239. used in fonts further than mandated by the specification and encoding
  240. some extra special characters in URLs. Reported by Neike
  241. Taika-Tessaro and Mario Heiderich.
  242. ! Added %HTML.Nofollow to add rel="nofollow" to external links.
  243. ! More types of SPL autoloaders allowed on later versions of PHP.
  244. ! Implementations for position, top, left, right, bottom, z-index
  245. when %CSS.Trusted is on.
  246. ! Add %Cache.SerializerPermissions option for custom serializer
  247. directory/file permissions
  248. ! Fix longstanding bug in Flash support for non-IE browsers, and
  249. allow more wmode attributes.
  250. ! Add %CSS.AllowedFonts to restrict permissible font names.
  251. - Switch to an iterative traversal of the DOM, which prevents us
  252. from running out of stack space for deeply nested documents.
  253. Thanks Maxim Krizhanovsky for contributing a patch.
  254. - Make removal of conditional IE comments ungreedy; thanks Bernd
  255. for reporting.
  256. - Escape CDATA before removing Internet Explorer comments.
  257. - Fix removal of id attributes under certain conditions by ensuring
  258. armor attributes are preserved when recreating tags.
  259. - Check if schema.ser was corrupted.
  260. - Check if zend.ze1_compatibility_mode is on, and error out if it is.
  261. This safety check is only done for HTMLPurifier.auto.php; if you
  262. are using standalone or the specialized includes files, you're
  263. expected to know what you're doing.
  264. - Stop repeatedly writing the cache file after I'm done customizing a
  265. raw definition. Reported by ajh.
  266. - Switch to using require_once in the Bootstrap to work around bad
  267. interaction with Zend Debugger and APC. Reported by Antonio Parraga.
  268. - Fix URI handling when hostname is missing but scheme is present.
  269. Reported by Neike Taika-Tessaro.
  270. - Fix missing numeric entities on DirectLex; thanks Neike Taika-Tessaro
  271. for reporting.
  272. - Fix harmless notice from indexing into empty string. Thanks Matthijs
  273. Kooijman <matthijs@stdin.nl> for reporting.
  274. - Don't autoclose no parent elements are able to support the element
  275. that triggered the autoclose. In particular fixes strange behavior
  276. of stray <li> tags. Thanks pkuliga@gmail.com for reporting and
  277. Neike Taika-Tessaro <pinkgothic@gmail.com> for debugging assistance.
  278. 4.2.0, released 2010-09-15
  279. ! Added %Core.RemoveProcessingInstructions, which lets you remove
  280. <? ... ?> statements.
  281. ! Added %URI.DisableResources functionality; the directive originally
  282. did nothing. Thanks David Rothstein for reporting.
  283. ! Add documentation about configuration directive types.
  284. ! Add %CSS.ForbiddenProperties configuration directive.
  285. ! Add %HTML.FlashAllowFullScreen to permit embedded Flash objects
  286. to utilize full-screen mode.
  287. ! Add optional support for the <code>file</code> URI scheme, enable
  288. by explicitly setting %URI.AllowedSchemes.
  289. ! Add %Core.NormalizeNewlines options to allow turning off newline
  290. normalization.
  291. - Fix improper handling of Internet Explorer conditional comments
  292. by parser. Thanks zmonteca for reporting.
  293. - Fix missing attributes bug when running on Mac Snow Leopard and APC.
  294. Thanks sidepodcast for the fix.
  295. - Warn if an element is allowed, but an attribute it requires is
  296. not allowed.
  297. 4.1.1, released 2010-05-31
  298. - Fix undefined index warnings in maintenance scripts.
  299. - Fix bug in DirectLex for parsing elements with a single attribute
  300. with entities.
  301. - Rewrite CSS output logic for font-family and url(). Thanks Mario
  302. Heiderich <mario.heiderich@googlemail.com> for reporting and Takeshi
  303. Terada <t-terada@violet.plala.or.jp> for suggesting the fix.
  304. - Emit an error for CollectErrors if a body is extracted
  305. - Fix bug where in background-position for center keyword handling.
  306. - Fix infinite loop when a wrapper element is inserted in a context
  307. where it's not allowed. Thanks Lars <lars@renoz.dk> for reporting.
  308. - Remove +x bit and shebang from index.php; only supported mode is to
  309. explicitly call it with php.
  310. - Make test script less chatty when log_errors is on.
  311. 4.1.0, released 2010-04-26
  312. ! Support proprietary height attribute on table element
  313. ! Support YouTube slideshows that contain /cp/ in their URL.
  314. ! Support for data: URI scheme; not enabled by default, add it using
  315. %URI.AllowedSchemes
  316. ! Support flashvars when using %HTML.SafeObject and %HTML.SafeEmbed.
  317. ! Support for Internet Explorer compatibility with %HTML.SafeObject
  318. using %Output.FlashCompat.
  319. ! Handle <ol><ol> properly, by inserting the necessary <li> tag.
  320. - Always quote the insides of url(...) in CSS.
  321. 4.0.0, released 2009-07-07
  322. # APIs for ConfigSchema subsystem have substantially changed. See
  323. docs/dev-config-bcbreaks.txt for details; in essence, anything that
  324. had both namespace and directive now have a single unified key.
  325. # Some configuration directives were renamed, specifically:
  326. %AutoFormatParam.PurifierLinkifyDocURL -> %AutoFormat.PurifierLinkify.DocURL
  327. %FilterParam.ExtractStyleBlocksEscaping -> %Filter.ExtractStyleBlocks.Escaping
  328. %FilterParam.ExtractStyleBlocksScope -> %Filter.ExtractStyleBlocks.Scope
  329. %FilterParam.ExtractStyleBlocksTidyImpl -> %Filter.ExtractStyleBlocks.TidyImpl
  330. As usual, the old directive names will still work, but will throw E_NOTICE
  331. errors.
  332. # The allowed values for class have been relaxed to allow all of CDATA for
  333. doctypes that are not XHTML 1.1 or XHTML 2.0. For old behavior, set
  334. %Attr.ClassUseCDATA to false.
  335. # Instead of appending the content model to an old content model, a blank
  336. element will replace the old content model. You can use #SUPER to get
  337. the old content model.
  338. ! More robust support for name="" and id=""
  339. ! HTMLPurifier_Config::inherit($config) allows you to inherit one
  340. configuration, and have changes to that configuration be propagated
  341. to all of its children.
  342. ! Implement %HTML.Attr.Name.UseCDATA, which relaxes validation rules on
  343. the name attribute when set. Use with care. Thanks Ian Cook for
  344. sponsoring.
  345. ! Implement %AutoFormat.RemoveEmpty.RemoveNbsp, which removes empty
  346. tags that contain non-breaking spaces as well other whitespace. You
  347. can also modify which tags should have &nbsp; maintained with
  348. %AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.
  349. ! Implement %Attr.AllowedClasses, which allows administrators to restrict
  350. classes users can use to a specified finite set of classes, and
  351. %Attr.ForbiddenClasses, which is the logical inverse.
  352. ! You can now maintain your own configuration schema directories by
  353. creating a config-schema.php file or passing an extra argument. Check
  354. docs/dev-config-schema.html for more details.
  355. ! Added HTMLPurifier_Config->serialize() method, which lets you save away
  356. your configuration in a compact serial file, which you can unserialize
  357. and use directly without having to go through the overhead of setup.
  358. - Fix bug where URIDefinition would not get cleared if it's directives got
  359. changed.
  360. - Fix fatal error in HTMLPurifier_Encoder on certain platforms (probably NetBSD 5.0)
  361. - Fix bug in Linkify autoformatter involving <a><span>http://foo</span></a>
  362. - Make %URI.Munge not apply to links that have the same host as your host.
  363. - Prevent stray </body> tag from truncating output, if a second </body>
  364. is present.
  365. . Created script maintenance/rename-config.php for renaming a configuration
  366. directive while maintaining its alias. This script does not change source code.
  367. . Implement namespace locking for definition construction, to prevent
  368. bugs where a directive is used for definition construction but is not
  369. used to construct the cache hash.
  370. 3.3.0, released 2009-02-16
  371. ! Implement CSS property 'overflow' when %CSS.AllowTricky is true.
  372. ! Implement generic property list classess
  373. - Fix bug with testEncodingSupportsASCII() algorithm when iconv() implementation
  374. does not do the "right thing" with characters not supported in the output
  375. set.
  376. - Spellcheck UTF-8: The Secret To Character Encoding
  377. - Fix improper removal of the contents of elements with only whitespace. Thanks
  378. Eric Wald for reporting.
  379. - Fix broken test suite in versions of PHP without spl_autoload_register()
  380. - Fix degenerate case with YouTube filter involving double hyphens.
  381. Thanks Pierre Attar for reporting.
  382. - Fix YouTube rendering problem on certain versions of Firefox.
  383. - Fix CSSDefinition Printer problems with decorators
  384. - Add text parameter to unit tests, forces text output
  385. . Add verbose mode to command line test runner, use (--verbose)
  386. . Turn on unit tests for UnitConverter
  387. . Fix missing version number in configuration %Attr.DefaultImageAlt (added 3.2.0)
  388. . Fix newline errors that caused spurious failures when CRLF HTML Purifier was
  389. tested on Linux.
  390. . Removed trailing whitespace from all text files, see
  391. remote-trailing-whitespace.php maintenance script.
  392. . Convert configuration to use property list backend.
  393. 3.2.0, released 2008-10-31
  394. # Using %Core.CollectErrors forces line number/column tracking on, whereas
  395. previously you could theoretically turn it off.
  396. # HTMLPurifier_Injector->notifyEnd() is formally deprecated. Please
  397. use handleEnd() instead.
  398. ! %Output.AttrSort for when you need your attributes in alphabetical order to
  399. deal with a bug in FCKEditor. Requested by frank farmer.
  400. ! Enable HTML comments when %HTML.Trusted is on. Requested by Waldo Jaquith.
  401. ! Proper support for name attribute. It is now allowed and equivalent to the id
  402. attribute in a and img tags, and is only converted to id when %HTML.TidyLevel
  403. is heavy (for all doctypes).
  404. ! %AutoFormat.RemoveEmpty to remove some empty tags from documents. Please don't
  405. use on hand-written HTML.
  406. ! Add error-cases for unsupported elements in MakeWellFormed. This enables
  407. the strategy to be used, standalone, on untrusted input.
  408. ! %Core.AggressivelyFixLt is on by default. This causes more sensible
  409. processing of left angled brackets in smileys and other whatnot.
  410. ! Test scripts now have a 'type' parameter, which lets you say 'htmlpurifier',
  411. 'phpt', 'vtest', etc. in order to only execute those tests. This supercedes
  412. the --only-phpt parameter, although for backwards-compatibility the flag
  413. will still work.
  414. ! AutoParagraph auto-formatter will now preserve double-newlines upon output.
  415. Users who are not performing inbound filtering, this may seem a little
  416. useless, but as a bonus, the test suite and handling of edge cases is also
  417. improved.
  418. ! Experimental implementation of forms for %HTML.Trusted
  419. ! Track column numbers when maintain line numbers is on
  420. ! Proprietary 'background' attribute on table-related elements converted into
  421. corresponding CSS. Thanks Fusemail for sponsoring this feature!
  422. ! Add forward(), forwardUntilEndToken(), backward() and current() to Injector
  423. supertype.
  424. ! HTMLPurifier_Injector->handleEnd() permits modification to end tokens. The
  425. time of operation varies slightly from notifyEnd() as *all* end tokens are
  426. processed by the injector before they are subject to the well-formedness rules.
  427. ! %Attr.DefaultImageAlt allows overriding default behavior of setting alt to
  428. basename of image when not present.
  429. ! %AutoFormat.DisplayLinkURI neuters <a> tags into plain text URLs.
  430. - Fix two bugs in %URI.MakeAbsolute; one involving empty paths in base URLs,
  431. the other involving an undefined $is_folder error.
  432. - Throw error when %Core.Encoding is set to a spurious value. Previously,
  433. this errored silently and returned false.
  434. - Redirected stderr to stdout for flush error output.
  435. - %URI.DisableExternal will now use the host in %URI.Base if %URI.Host is not
  436. available.
  437. - Do not re-munge URL if the output URL has the same host as the input URL.
  438. Requested by Chris.
  439. - Fix error in documentation regarding %Filter.ExtractStyleBlocks
  440. - Prevent <![CDATA[<body></body>]]> from triggering %Core.ConvertDocumentToFragment
  441. - Fix bug with inline elements in blockquotes conflicting with strict doctype
  442. - Detect if HTML support is disabled for DOM by checking for loadHTML() method.
  443. - Fix bug where dots and double-dots in absolute URLs without hostname were
  444. not collapsed by URIFilter_MakeAbsolute.
  445. - Fix bug with anonymous modules operating on SafeEmbed or SafeObject elements
  446. by reordering their addition.
  447. - Will now throw exception on many error conditions during lexer creation; also
  448. throw an exception when MaintainLineNumbers is true, but a non-tracksLineNumbers
  449. is being used.
  450. - Detect if domxml extension is loaded, and use DirectLEx accordingly.
  451. - Improve handling of big numbers with floating point arithmetic in UnitConverter.
  452. Reported by David Morton.
  453. . Strategy_MakeWellFormed now operates in-place, saving memory and allowing
  454. for more interesting filter-backtracking
  455. . New HTMLPurifier_Injector->rewind() functionality, allows injectors to rewind
  456. index to reprocess tokens.
  457. . StringHashParser now allows for multiline sections with "empty" content;
  458. previously the section would remain undefined.
  459. . Added --quick option to multitest.php, which tests only the most recent
  460. release for each series.
  461. . Added --distro option to multitest.php, which accepts either 'normal' or
  462. 'standalone'. This supercedes --exclude-normal and --exclude-standalone
  463. 3.1.1, released 2008-06-19
  464. # %URI.Munge now, by default, does not munge resources (for example, <img src="">)
  465. In order to enable this again, please set %URI.MungeResources to true.
  466. ! More robust imagecrash protection with height/width CSS with %CSS.MaxImgLength,
  467. and height/width HTML with %HTML.MaxImgLength.
  468. ! %URI.MungeSecretKey for secure URI munging. Thanks Chris
  469. for sponsoring this feature. Check out the corresponding documentation
  470. for details. (Att Nightly testers: The API for this feature changed before
  471. the general release. Namely, rename your directives %URI.SecureMungeSecretKey =>
  472. %URI.MungeSecretKey and and %URI.SecureMunge => %URI.Munge)
  473. ! Implemented post URI filtering. Set member variable $post to true to set
  474. a URIFilter as such.
  475. ! Allow modules to define injectors via $info_injector. Injectors are
  476. automatically disabled if injector's needed elements are not found.
  477. ! Support for "safe" objects added, use %HTML.SafeObject and %HTML.SafeEmbed.
  478. Thanks Chris for sponsoring. If you've been using ad hoc code from the
  479. forums, PLEASE use this instead.
  480. ! Added substitutions for %e, %n, %a and %p in %URI.Munge (in order,
  481. embedded, tag name, attribute name, CSS property name). See %URI.Munge
  482. for more details. Requested by Jochem Blok.
  483. - Disable percent height/width attributes for img.
  484. - AttrValidator operations are now atomic; updates to attributes are not
  485. manifest in token until end of operations. This prevents naughty internal
  486. code from directly modifying CurrentToken when they're not supposed to.
  487. This semantics change was requested by frank farmer.
  488. - Percent encoding checks enabled for URI query and fragment
  489. - Fix stray backslashes in font-family; CSS Unicode character escapes are
  490. now properly resolved (although *only* in font-family). Thanks Takeshi Terada
  491. for reporting.
  492. - Improve parseCDATA algorithm to take into account newline normalization
  493. - Account for browser confusion between Yen character and backslash in
  494. Shift_JIS encoding. This fix generalizes to any other encoding which is not
  495. a strict superset of printable ASCII. Thanks Takeshi Terada for reporting.
  496. - Fix missing configuration parameter in Generator calls. Thanks vs for the
  497. partial patch.
  498. - Improved adherence to Unicode by checking for non-character codepoints.
  499. Thanks Geoffrey Sneddon for reporting. This may result in degraded
  500. performance for extremely large inputs.
  501. - Allow CSS property-value pair ''text-decoration: none''. Thanks Jochem Blok
  502. for reporting.
  503. . Added HTMLPurifier_UnitConverter and HTMLPurifier_Length for convenient
  504. handling of CSS-style lengths. HTMLPurifier_AttrDef_CSS_Length now uses
  505. this class.
  506. . API of HTMLPurifier_AttrDef_CSS_Length changed from __construct($disable_negative)
  507. to __construct($min, $max). __construct(true) is equivalent to
  508. __construct('0').
  509. . Added HTMLPurifier_AttrDef_Switch class
  510. . Rename HTMLPurifier_HTMLModule_Tidy->construct() to setup() and bubble method
  511. up inheritance hierarchy to HTMLPurifier_HTMLModule. All HTMLModules
  512. get this called with the configuration object. All modules now
  513. use this rather than __construct(), although legacy code using constructors
  514. will still work--the new format, however, lets modules access the
  515. configuration object for HTML namespace dependant tweaks.
  516. . AttrDef_HTML_Pixels now takes a single construction parameter, pixels.
  517. . ConfigSchema data-structure heavily optimized; on average it uses a third
  518. the memory it did previously. The interface has changed accordingly,
  519. consult changes to HTMLPurifier_Config for details.
  520. . Variable parsing types now are magic integers instead of strings
  521. . Added benchmark for ConfigSchema
  522. . HTMLPurifier_Generator requires $config and $context parameters. If you
  523. don't know what they should be, use HTMLPurifier_Config::createDefault()
  524. and new HTMLPurifier_Context().
  525. . Printers now properly distinguish between output configuration, and
  526. target configuration. This is not applicable to scripts using
  527. the Printers for HTML Purifier related tasks.
  528. . HTML/CSS Printers must be primed with prepareGenerator($gen_config), otherwise
  529. fatal errors will ensue.
  530. . URIFilter->prepare can return false in order to abort loading of the filter
  531. . Factory for AttrDef_URI implemented, URI#embedded to indicate URI that embeds
  532. an external resource.
  533. . %URI.Munge functionality factored out into a post-filter class.
  534. . Added CurrentCSSProperty context variable during CSS validation
  535. 3.1.0, released 2008-05-18
  536. # Unnecessary references to objects (vestiges of PHP4) removed from method
  537. signatures. The following methods do not need references when assigning from
  538. them and will result in E_STRICT errors if you try:
  539. + HTMLPurifier_Config->get*Definition() [* = HTML, CSS]
  540. + HTMLPurifier_ConfigSchema::instance()
  541. + HTMLPurifier_DefinitionCacheFactory::instance()
  542. + HTMLPurifier_DefinitionCacheFactory->create()
  543. + HTMLPurifier_DoctypeRegistry->register()
  544. + HTMLPurifier_DoctypeRegistry->get()
  545. + HTMLPurifier_HTMLModule->addElement()
  546. + HTMLPurifier_HTMLModule->addBlankElement()
  547. + HTMLPurifier_LanguageFactory::instance()
  548. # Printer_ConfigForm's get*() functions were static-ified
  549. # %HTML.ForbiddenAttributes requires attribute declarations to be in the
  550. form of tag@attr, NOT tag.attr (which will throw an error and won't do
  551. anything). This is for forwards compatibility with XML; you'd do best
  552. to migrate an %HTML.AllowedAttributes directives to this syntax too.
  553. ! Allow index to be false for config from form creation
  554. ! Added HTMLPurifier::VERSION constant
  555. ! Commas, not dashes, used for serializer IDs. This change is forwards-compatible
  556. and allows for version numbers like "3.1.0-dev".
  557. ! %HTML.Allowed deals gracefully with whitespace anywhere, anytime!
  558. ! HTML Purifier's URI handling is a lot more robust, with much stricter
  559. validation checks and better percent encoding handling. Thanks Gareth Heyes
  560. for indicating security vulnerabilities from lax percent encoding.
  561. ! Bootstrap autoloader deals more robustly with classes that don't exist,
  562. preventing class_exists($class, true) from barfing.
  563. - InterchangeBuilder now alphabetizes its lists
  564. - Validation error in configdoc output fixed
  565. - Iconv and other encoding errors muted even with custom error handlers that
  566. do not honor error_reporting
  567. - Add protection against imagecrash attack with CSS height/width
  568. - HTMLPurifier::instance() created for consistency, is equivalent to getInstance()
  569. - Fixed and revamped broken ConfigForm smoketest
  570. - Bug with bool/null fields in Printer_ConfigForm fixed
  571. - Bug with global forbidden attributes fixed
  572. - Improved error messages for allowed and forbidden HTML elements and attributes
  573. - Missing (or null) in configdoc documentation restored
  574. - If DOM throws and exception during parsing with PH5P (occurs in newer versions
  575. of DOM), HTML Purifier punts to DirectLex
  576. - Fatal error with unserialization of ScriptRequired
  577. - Created directories are now chmod'ed properly
  578. - Fixed bug with fallback languages in LanguageFactory
  579. - Standalone testing setup properly with autoload
  580. . Out-of-date documentation revised
  581. . UTF-8 encoding check optimization as suggested by Diego
  582. . HTMLPurifier_Error removed in favor of exceptions
  583. . More copy() function removed; should use clone instead
  584. . More extensive unit tests for HTMLDefinition
  585. . assertPurification moved to central harness
  586. . HTMLPurifier_Generator accepts $config and $context parameters during
  587. instantiation, not runtime
  588. . Double-quotes outside of attribute values are now unescaped
  589. 3.1.0rc1, released 2008-04-22
  590. # Autoload support added. Internal require_once's removed in favor of an
  591. explicit require list or autoloading. To use HTML Purifier,
  592. you must now either use HTMLPurifier.auto.php
  593. or HTMLPurifier.includes.php; setting the include path and including
  594. HTMLPurifier.php is insufficient--in such cases include HTMLPurifier.autoload.php
  595. as well to register our autoload handler (or modify your autoload function
  596. to check HTMLPurifier_Bootstrap::getPath($class)). You can also use
  597. HTMLPurifier.safe-includes.php for a less performance friendly but more
  598. user-friendly library load.
  599. # HTMLPurifier_ConfigSchema static functions are officially deprecated. Schema
  600. information is stored in the ConfigSchema directory, and the
  601. maintenance/generate-schema-cache.php generates the schema.ser file, which
  602. is now instantiated. Support for userland schema changes coming soon!
  603. # HTMLPurifier_Config will now throw E_USER_NOTICE when you use a directive
  604. alias; to get rid of these errors just modify your configuration to use
  605. the new directive name.
  606. # HTMLPurifier->addFilter is deprecated; built-in filters can now be
  607. enabled using %Filter.$filter_name or by setting your own filters using
  608. %Filter.Custom
  609. # Directive-level safety properties superceded in favor of module-level
  610. safety. Internal method HTMLModule->addElement() has changed, although
  611. the externally visible HTMLDefinition->addElement has *not* changed.
  612. ! Extra utility classes for testing and non-library operations can
  613. be found in extras/. Specifically, these are FSTools and ConfigDoc.
  614. You may find a use for these in your own project, but right now they
  615. are highly experimental and volatile.
  616. ! Integration with PHPT allows for automated smoketests
  617. ! Limited support for proprietary HTML elements, namely <marquee>, sponsored
  618. by Chris. You can enable them with %HTML.Proprietary if your client
  619. demands them.
  620. ! Support for !important CSS cascade modifier. By default, this will be stripped
  621. from CSS, but you can enable it using %CSS.AllowImportant
  622. ! Support for display and visibility CSS properties added, set %CSS.AllowTricky
  623. to true to use them.
  624. ! HTML Purifier now has its own Exception hierarchy under HTMLPurifier_Exception.
  625. Developer error (not enduser error) can cause these to be triggered.
  626. ! Experimental kses() wrapper introduced with HTMLPurifier.kses.php
  627. ! Finally %CSS.AllowedProperties for tweaking allowed CSS properties without
  628. mucking around with HTMLPurifier_CSSDefinition
  629. ! ConfigDoc output has been enhanced with version and deprecation info.
  630. ! %HTML.ForbiddenAttributes and %HTML.ForbiddenElements implemented.
  631. - Autoclose now operates iteratively, i.e. <span><span><div> now has
  632. both span tags closed.
  633. - Various HTMLPurifier_Config convenience functions now accept another parameter
  634. $schema which defines what HTMLPurifier_ConfigSchema to use besides the
  635. global default.
  636. - Fix bug with trusted script handling in libxml versions later than 2.6.28.
  637. - Fix bug in ExtractStyleBlocks with comments in style tags
  638. - Fix bug in comment parsing for DirectLex
  639. - Flush output now displayed when in command line mode for unit tester
  640. - Fix bug with rgb(0, 1, 2) color syntax with spaces inside shorthand syntax
  641. - HTMLPurifier_HTMLDefinition->addAttribute can now be called multiple times
  642. on the same element without emitting errors.
  643. - Fixed fatal error in PH5P lexer with invalid tag names
  644. . Plugins now get their own changelogs according to project conventions.
  645. . Convert tokens to use instanceof, reducing memory footprint and
  646. improving comparison speed.
  647. . Dry runs now supported in SimpleTest; testing facilities improved
  648. . Bootstrap class added for handling autoloading functionality
  649. . Implemented recursive glob at FSTools->globr
  650. . ConfigSchema now has instance methods for all corresponding define*
  651. static methods.
  652. . A couple of new historical maintenance scripts were added.
  653. . HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php split into two files
  654. . tests/index.php can now be run from any directory.
  655. . HTMLPurifier_Token subclasses split into seperate files
  656. . HTMLPURIFIER_PREFIX now is defined in Bootstrap.php, NOT HTMLPurifier.php
  657. . HTMLPURIFIER_PREFIX can now be defined outside of HTML Purifier
  658. . New --php=php flag added, allows PHP executable to be specified (command
  659. line only!)
  660. . htmlpurifier_add_test() preferred method to translate test files in to
  661. classes, because it handles PHPT files too.
  662. . Debugger class is deprecated and will be removed soon.
  663. . Command line argument parsing for testing scripts revamped, now --opt value
  664. format is supported.
  665. . Smoketests now cleanup after magic quotes
  666. . Generator now can output comments (however, comments are still stripped
  667. from HTML Purifier output)
  668. . HTMLPurifier_ConfigSchema->validate() deprecated in favor of
  669. HTMLPurifier_VarParser->parse()
  670. . Integers auto-cast into float type by VarParser.
  671. . HTMLPURIFIER_STRICT removed; no validation is performed on runtime, only
  672. during cache generation
  673. . Reordered script calls in maintenance/flush.php
  674. . Command line scripts now honor exit codes
  675. . When --flush fails in unit testers, abort tests and print message
  676. . Improved documentation in docs/dev-flush.html about the maintenance scripts
  677. . copy() methods removed in favor of clone keyword
  678. 3.0.0, released 2008-01-06
  679. # HTML Purifier is PHP 5 only! The 2.1.x branch will be maintained
  680. until PHP 4 is completely deprecated, but no new features will be added
  681. to it.
  682. + Visibility declarations added
  683. + Constructor methods renamed to __construct()
  684. + PHP4 reference cruft removed (in progress)
  685. ! CSS properties are now case-insensitive
  686. ! DefinitionCacheFactory now can register new implementations
  687. ! New HTMLPurifier_Filter_ExtractStyleBlocks for extracting <style> from
  688. documents and cleaning their contents up. Requires the CSSTidy library
  689. <http://csstidy.sourceforge.net/>. You can access the blocks with the
  690. 'StyleBlocks' Context variable ($purifier->context->get('StyleBlocks')).
  691. The output CSS can also be "scoped" for a specific element, use:
  692. %Filter.ExtractStyleBlocksScope
  693. ! Experimental support for some proprietary CSS attributes allowed:
  694. opacity (and all of the browser-specific equivalents) and scrollbar colors.
  695. Enable by setting %CSS.Proprietary to true.
  696. - Colors missing # but in hex form will be corrected
  697. - CSS Number algorithm improved
  698. - Unit testing and multi-testing now on steroids: command lines,
  699. XML output, and other goodies now added.
  700. . Unit tests for Injector improved
  701. . New classes:
  702. + HTMLPurifier_AttrDef_CSS_AlphaValue
  703. + HTMLPurifier_AttrDef_CSS_Filter
  704. . Multitest now has a file docblock
  705. 2.1.3, released 2007-11-05
  706. ! tests/multitest.php allows you to test multiple versions by running
  707. tests/index.php through multiple interpreters using `phpv` shell
  708. script (you must provide this script!)
  709. - Fixed poor include ordering for Email URI AttrDefs, causes fatal errors
  710. on some systems.
  711. - Injector algorithm further refined: off-by-one error regarding skip
  712. counts for dormant injectors fixed
  713. - Corrective blockquote definition now enabled for HTML 4.01 Strict
  714. - Fatal error when <img> tag (or any other element with required attributes)
  715. has 'id' attribute fixed, thanks NykO18 for reporting
  716. - Fix warning emitted when a non-supported URI scheme is passed to the
  717. MakeAbsolute URIFilter, thanks NykO18 (again)
  718. - Further refine AutoParagraph injector. Behavior inside of elements
  719. allowing paragraph tags clarified: only inline content delimeted by
  720. double newlines (not block elements) are paragraphed.
  721. - Buggy treatment of end tags of elements that have required attributes
  722. fixed (does not manifest on default tag-set)
  723. - Spurious internal content reorganization error suppressed
  724. - HTMLDefinition->addElement now returns a reference to the created
  725. element object, as implied by the documentation
  726. - Phorum mod's HTML Purifier help message expanded (unreleased elsewhere)
  727. - Fix a theoretical class of infinite loops from DirectLex reported
  728. by Nate Abele
  729. - Work around unnecessary DOMElement type-cast in PH5P that caused errors
  730. in PHP 5.1
  731. - Work around PHP 4 SimpleTest lack-of-error complaining for one-time-only
  732. HTMLDefinition errors, this may indicate problems with error-collecting
  733. facilities in PHP 5
  734. - Make ErrorCollectorEMock work in both PHP 4 and PHP 5
  735. - Make PH5P work with PHP 5.0 by removing unnecessary array parameter typedef
  736. . %Core.AcceptFullDocuments renamed to %Core.ConvertDocumentToFragment
  737. to better communicate its purpose
  738. . Error unit tests can now specify the expectation of no errors. Future
  739. iterations of the harness will be extremely strict about what errors
  740. are allowed
  741. . Extend Injector hooks to allow for more powerful injector routines
  742. . HTMLDefinition->addBlankElement created, as according to the HTMLModule
  743. method
  744. . Doxygen configuration file updated, with minor improvements
  745. . Test runner now checks for similarly named files in conf/ directory too.
  746. . Minor cosmetic change to flush-definition-cache.php: trailing newline is
  747. outputted
  748. . Maintenance script for generating PH5P patch added, original PH5P source
  749. file also added under version control
  750. . Full unit test runner script title made more descriptive with PHP version
  751. . Updated INSTALL file to state that 4.3.7 is the earliest version we
  752. are actively testing
  753. 2.1.2, released 2007-09-03
  754. ! Implemented Object module for trusted users
  755. ! Implemented experimental HTML5 parsing mode using PH5P. To use, add
  756. this to your code:
  757. require_once 'HTMLPurifier/Lexer/PH5P.php';
  758. $config->set('Core', 'LexerImpl', 'PH5P');
  759. Note that this Lexer introduces some classes not in the HTMLPurifier
  760. namespace. Also, this is PHP5 only.
  761. ! CSS property border-spacing implemented
  762. - Fix non-visible parsing error in DirectLex with empty tags that have
  763. slashes inside attribute values.
  764. - Fix typo in CSS definition: border-collapse:seperate; was incorrectly
  765. accepted as valid CSS. Usually non-visible, because this styling is the
  766. default for tables in most browsers. Thanks Brett Zamir for pointing
  767. this out.
  768. - Fix validation errors in configuration form
  769. - Hammer out a bunch of edge-case bugs in the standalone distribution
  770. - Inclusion reflection removed from URISchemeRegistry; you must manually
  771. include any new schema files you wish to use
  772. - Numerous typo fixes in documentation thanks to Brett Zamir
  773. . Unit test refactoring for one logical test per test function
  774. . Config and context parameters in ComplexHarness deprecated: instead, edit
  775. the $config and $context member variables
  776. . HTML wrapper in DOMLex now takes DTD identifiers into account; doesn't
  777. really make a difference, but is good for completeness sake
  778. . merge-library.php script refactored for greater code reusability and
  779. PHP4 compatibility
  780. 2.1.1, released 2007-08-04
  781. - Fix show-stopper bug in %URI.MakeAbsolute functionality
  782. - Fix PHP4 syntax error in standalone version
  783. . Add prefix directory to include path for standalone, this prevents
  784. other installations from clobbering the standalone's URI schemes
  785. . Single test methods can be invoked by prefixing with __only
  786. 2.1.0, released 2007-08-02
  787. # flush-htmldefinition-cache.php superseded in favor of a generic
  788. flush-definition-cache.php script, you can clear a specific cache
  789. by passing its name as a parameter to the script
  790. ! Phorum mod implemented for HTML Purifier
  791. ! With %Core.AggressivelyFixLt, <3 and similar emoticons no longer
  792. trigger HTML removal in PHP5 (DOMLex). This directive is not necessary
  793. for PHP4 (DirectLex).
  794. ! Standalone file now available, which greatly reduces the amount of
  795. includes (although there are still a few files that reside in the
  796. standalone folder)
  797. ! Relative URIs can now be transformed into their absolute equivalents
  798. using %URI.Base and %URI.MakeAbsolute
  799. ! Ruby implemented for XHTML 1.1
  800. ! You can now define custom URI filtering behavior, see enduser-uri-filter.html
  801. for more details
  802. ! UTF-8 font names now supported in CSS
  803. - AutoFormatters emit friendly error messages if tags or attributes they
  804. need are not allowed
  805. - ConfigForm's compactification of directive names is now configurable
  806. - AutoParagraph autoformatter algorithm refined after field-testing
  807. - XHTML 1.1 now applies XHTML 1.0 Strict cleanup routines, namely
  808. blockquote wrapping
  809. - Contents of <style> tags removed by default when tags are removed
  810. . HTMLPurifier_Config->getSerial() implemented, this is extremely useful
  811. for output cache invalidation
  812. . ConfigForm printer now can retrieve CSS and JS files as strings, in
  813. case HTML Purifier's directory is not publically accessible
  814. . Introduce new text/itext configuration directive values: these represent
  815. longer strings that would be more appropriately edited with a textarea
  816. . Allow newlines to act as separators for lists, hashes, lookups and
  817. %HTML.Allowed
  818. . ConfigForm generates textareas instead of text inputs for lists, hashes,
  819. lookups, text and itext fields
  820. . Hidden element content removal genericized: %Core.HiddenElements can
  821. be used to customize this behavior, by default <script> and <style> are
  822. hidden
  823. . Added HTMLPURIFIER_PREFIX constant, should be used instead of dirname(__FILE__)
  824. . Custom ChildDef added to default include list
  825. . URIScheme reflection improved: will not attempt to include file if class
  826. already exists. May clobber autoload, so I need to keep an eye on it
  827. . ConfigSchema heavily optimized, will only collect information and validate
  828. definitions when HTMLPURIFIER_SCHEMA_STRICT is true.
  829. . AttrDef_URI unit tests and implementation refactored
  830. . benchmarks/ directory now protected from public view with .htaccess file;
  831. run the tests via command line
  832. . URI scheme is munged off if there is no authority and the scheme is the
  833. default one
  834. . All unit tests inherit from HTMLPurifier_Harness, not UnitTestCase
  835. . Interface for URIScheme changed
  836. . Generic URI object to hold components of URI added, most systems involved
  837. in URI validation have been migrated to use it
  838. . Custom filtering for URIs factored out to URIDefinition interface for
  839. maximum extensibility
  840. 2.0.1, released 2007-06-27
  841. ! Tag auto-closing now based on a ChildDef heuristic rather than a
  842. manually set auto_close array; some behavior may change
  843. ! Experimental AutoFormat functionality added: auto-paragraph and
  844. linkify your HTML input by setting %AutoFormat.AutoParagraph and
  845. %AutoFormat.Linkify to true
  846. ! Newlines normalized internally, and then converted back to the
  847. value of PHP_EOL. If this is not desired, set your newline format
  848. using %Output.Newline.
  849. ! Beta error collection, messages are implemented for the most generic
  850. cases involving Lexing or Strategies
  851. - Clean up special case code for <script> tags
  852. - Reorder includes for DefinitionCache decorators, fixes a possible
  853. missing class error
  854. - Fixed bug where manually modified definitions were not saved via cache
  855. (mostly harmless, except for the fact that it would be a little slower)
  856. - Configuration objects with different serials do not clobber each
  857. others when revision numbers are unequal
  858. - Improve Serializer DefinitionCache directory permissions checks
  859. - DefinitionCache no longer throws errors when it encounters old
  860. serial files that do not conform to the current style
  861. - Stray xmlns attributes removed from configuration documentation
  862. - configForm.php smoketest no longer has XSS vulnerability due to
  863. unescaped print_r output
  864. - Printer adheres to configuration's directives on output format
  865. - Fix improperly named form field in ConfigForm printer
  866. . Rewire some test-cases to swallow errors rather than expect them
  867. . HTMLDefinition printer updated with some of the new attributes
  868. . DefinitionCache keys reordered to reflect precedence: version number,
  869. hash, then revision number
  870. . %Core.DefinitionCache renamed to %Cache.DefinitionImpl
  871. . Interlinking in configuration documentation added using
  872. Injector_PurifierLinkify
  873. . Directives now keep track of aliases to themselves
  874. . Error collector now requires a severity to be passed, use PHP's internal
  875. error constants for this
  876. . HTMLPurifier_Config::getAllowedDirectivesForForm implemented, allows
  877. much easier selective embedding of configuration values
  878. . Doctype objects now accept public and system DTD identifiers
  879. . %HTML.Doctype is now constrained by specific values, to specify a custom
  880. doctype use new %HTML.CustomDoctype
  881. . ConfigForm truncates long directives to keep the form small, and does
  882. not re-output namespaces
  883. 2.0.0, released 2007-06-20
  884. # Completely refactored HTMLModuleManager, decentralizing safety
  885. information
  886. # Transform modules changed to Tidy modules, which offer more flexibility
  887. and better modularization
  888. # Configuration object now finalizes itself when a read operation is
  889. performed on it, ensuring that its internal state stays consistent.
  890. To revert this behavior, you can set the $autoFinalize member variable
  891. off, but it's not recommended.
  892. # New compact syntax for AttrDef objects that can be used to instantiate
  893. new objects via make()
  894. # Definitions (esp. HTMLDefinition) are now cached for a significant
  895. performance boost. You can disable caching by setting %Core.DefinitionCache
  896. to null. You CANNOT edit raw definitions without setting the corresponding
  897. DefinitionID directive (%HTML.DefinitionID for HTMLDefinition).
  898. # Contents between <script> tags are now completely removed if <script>
  899. is not allowed
  900. # Prototype-declarations for Lexer removed in favor of configuration
  901. determination of Lexer implementations.
  902. ! HTML Purifier now works in PHP 4.3.2.
  903. ! Configuration form-editing API makes tweaking HTMLPurifier_Config a
  904. breeze!
  905. ! Configuration directives that accept hashes now allow new string
  906. format: key1:value1,key2:value2
  907. ! ConfigDoc now factored into OOP design
  908. ! All deprecated elements now natively supported
  909. ! Implement TinyMCE styled whitelist specification format in
  910. %HTML.Allowed
  911. ! Config object gives more friendly error messages when things go wrong
  912. ! Advanced API implemented: easy functions for creating elements (addElement)
  913. and attributes (addAttribute) on HTMLDefinition
  914. ! Add native support for required attributes
  915. - Deprecated and removed EnableRedundantUTF8Cleaning. It didn't even work!
  916. - DOMLex will not emit errors when a custom error handler that does not
  917. honor error_reporting is used
  918. - StrictBlockquote child definition refrains from wrapping whitespace
  919. in tags now.
  920. - Bug resulting from tag transforms to non-allowed elements fixed
  921. - ChildDef_Custom's regex generation has been improved, removing several
  922. false positives
  923. . Unit test for ElementDef created, ElementDef behavior modified to
  924. be more flexible
  925. . Added convenience functions for HTMLModule constructors
  926. . AttrTypes now has accessor functions that should be used instead
  927. of directly manipulating info
  928. . TagTransform_Center deprecated in favor of generic TagTransform_Simple
  929. . Add extra protection in AttrDef_URI against phantom Schemes
  930. . Doctype object added to HTMLDefinition which describes certain aspects
  931. of the operational document type
  932. . Lexer is now pre-emptively included, with a conditional include for the
  933. PHP5 only version.
  934. . HTMLDefinition and CSSDefinition have a common parent class: Definition.
  935. . DirectLex can now track line-numbers
  936. . Preliminary error collector is in place, although no code actually reports
  937. errors yet
  938. . Factor out most of ValidateAttributes to new AttrValidator class
  939. 1.6.1, released 2007-05-05
  940. ! Support for more deprecated attributes via transformations:
  941. + hspace and vspace in img
  942. + size and noshade in hr
  943. + nowrap in td
  944. + clear in br
  945. + align in caption, table, img and hr
  946. + type in ul, ol and li
  947. ! DirectLex now preserves text in which a < bracket is followed by
  948. a non-alphanumeric character. This means that certain emoticons
  949. are now preserved.
  950. ! %Core.RemoveInvalidImg is now operational, when set to false invalid
  951. images will hang around with an empty src
  952. ! target attribute in a tag supported, use %Attr.AllowedFrameTargets
  953. to enable
  954. ! CSS property white-space now allows nowrap (supported in all modern
  955. browsers) but not others (which have spotty browser implementations)
  956. ! XHTML 1.1 mode now sort-of works without any fatal errors, and
  957. lang is now moved over to xml:lang.
  958. ! Attribute transformation smoketest available at smoketests/attrTransform.php
  959. ! Transformation of font's size attribute now handles super-large numbers
  960. - Possibly fatal bug with __autoload() fixed in module manager
  961. - Invert HTMLModuleManager->addModule() processing order to check
  962. prefixes first and then the literal module
  963. - Empty strings get converted to empty arrays instead of arrays with
  964. an empty string in them.
  965. - Merging in attribute lists now works.
  966. . Demo script removed: it has been added to the website's repository
  967. . Basic.php script modified to work out of the box
  968. . Refactor AttrTransform classes to reduce duplication
  969. . AttrTransform_TextAlign axed in favor of a more general
  970. AttrTransform_EnumToCSS, refer to HTMLModule/TransformToStrict.php to
  971. see how the new equivalent is implemented
  972. . Unit tests now use exclusively assertIdentical
  973. 1.6.0, released 2007-04-01
  974. ! Support for most common deprecated attributes via transformations:
  975. + bgcolor in td, th, tr and table
  976. + border in img
  977. + name in a and img
  978. + width in td, th and hr
  979. + height in td, th
  980. ! Support for CSS attribute 'height' added
  981. ! Support for rel and rev attributes in a tags added, use %Attr.AllowedRel
  982. and %Attr.AllowedRev to activate
  983. - You can define ID blacklists using regular expressions via
  984. %Attr.IDBlacklistRegexp
  985. - Error messages are emitted when you attempt to "allow" elements or
  986. attributes that HTML Purifier does not support
  987. - Fix segfault in unit test. The problem is not very reproduceable and
  988. I don't know what causes it, but a six line patch fixed it.
  989. 1.5.0, released 2007-03-23
  990. ! Added a rudimentary I18N and L10N system modeled off MediaWiki. It
  991. doesn't actually do anything yet, but keep your eyes peeled.
  992. ! docs/enduser-utf8.html explains how to use UTF-8 and HTML Purifier
  993. ! Newly structured HTMLDefinition modeled off of XHTML 1.1 modules.
  994. I am loathe to release beta quality APIs, but this is exactly that;
  995. don't use the internal interfaces if you're not willing to do migration
  996. later on.
  997. - Allow 'x' subtag in language codes
  998. - Fixed buggy chameleon-support for ins and del
  999. . Added support for IDREF attributes (i.e. for)
  1000. . Renamed HTMLPurifier_AttrDef_Class to HTMLPurifier_AttrDef_Nmtokens
  1001. . Removed context variable ParentType, replaced with IsInline, which
  1002. is false when you're not inline and an integer of the parent that
  1003. caused you to become inline when you are (so possibly zero)
  1004. . Removed ElementDef->type in favor of ElementDef->descendants_are_inline
  1005. and HTMLDefinition->content_sets
  1006. . StrictBlockquote now reports what elements its supposed to allow,
  1007. rather than what it does allow
  1008. . Removed HTMLDefinition->info_flow_elements in favor of
  1009. HTMLDefinition->content_sets['Flow']
  1010. . Removed redundant "exclusionary" definitions from DTD roster
  1011. . StrictBlockquote now requires a construction parameter as if it
  1012. were an Required ChildDef, this is the "real" set of allowed elements
  1013. . AttrDef partitioned into HTML, CSS and URI segments
  1014. . Modify Youtube filter regexp to be multiline
  1015. . Require both PHP5 and DOM extension in order to use DOMLex, fixes
  1016. some edge cases where a DOMDocument class exists in a PHP4 environment
  1017. due to DOM XML extension.
  1018. 1.4.1, released 2007-01-21
  1019. ! docs/enduser-youtube.html updated according to new functionality
  1020. - YouTube IDs can have underscores and dashes
  1021. 1.4.0, released 2007-01-21
  1022. ! Implemented list-style-image, URIs now allowed in list-style
  1023. ! Implemented background-image, background-repeat, background-attachment
  1024. and background-position CSS properties. Shorthand property background
  1025. supports all of these properties.
  1026. ! Configuration documentation looks nicer
  1027. ! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode
  1028. characters while %Core.Encoding is set to a non-UTF-8 encoding.
  1029. ! Support for configuration directive aliases added
  1030. ! Config object can now be instantiated from ini files
  1031. ! YouTube preservation code added to the core, with two lines of code
  1032. you can add it as a filter to your code. See smoketests/preserveYouTube.php
  1033. for sample code.
  1034. ! Moved SLOW to docs/enduser-slow.html and added code examples
  1035. - Replaced version check with functionality check for DOM (thanks Stephen
  1036. Khoo)
  1037. . Added smoketest 'all.php', which loads all other smoketests via frames
  1038. . Implemented AttrDef_CSSURI for url(http://google.com) style declarations
  1039. . Added convenient single test selector form on test runner
  1040. 1.3.2, released 2006-12-25
  1041. ! HTMLPurifier object now accepts configuration arrays, no need to manually
  1042. instantiate a configuration object
  1043. ! Context object now accessible to outside
  1044. ! Added enduser-youtube.html, explains how to embed YouTube videos. See
  1045. also corresponding smoketest preserveYouTube.php.
  1046. ! Added purifyArray(), which takes a list of HTML and purifies it all
  1047. ! Added static member variable $version to HTML Purifier with PHP-compatible
  1048. version number string.
  1049. - Fixed fatal error thrown by upper-cased language attributes
  1050. - printDefinition.php: added labels, added better clarification
  1051. . HTMLPurifier_Config::create() added, takes mixed variable and converts into
  1052. a HTMLPurifier_Config object.
  1053. 1.3.1, released 2006-12-06
  1054. ! Added HTMLPurifier.func.php stub for a convenient function to call the library
  1055. - Fixed bug in RemoveInvalidImg code that caused all images to be dropped
  1056. (thanks to .mario for reporting this)
  1057. . Standardized all attribute handling variables to attr, made it plural
  1058. 1.3.0, released 2006-11-26
  1059. # Invalid images are now removed, rather than replaced with a dud
  1060. <img src="" alt="Invalid image" />. Previous behavior can be restored
  1061. with new directive %Core.RemoveInvalidImg set to false.
  1062. ! (X)HTML Strict now supported
  1063. + Transparently handles inline elements in block context (blockquote)
  1064. ! Added GET method to demo for easier validation, added 50kb max input size
  1065. ! New directive %HTML.BlockWrapper, for block-ifying inline elements
  1066. ! New directive %HTML.Parent, allows you to only allow inline content
  1067. ! New directives %HTML.AllowedElements and %HTML.AllowedAttributes to let
  1068. users narrow the set of allowed tags
  1069. ! <li value="4"> and <ul start="2"> now allowed in loose mode
  1070. ! New directives %URI.DisableExternalResources and %URI.DisableResources
  1071. ! New directive %Attr.DisableURI, which eliminates all hyperlinking
  1072. ! New directive %URI.Munge, munges URI so you can use some sort of redirector
  1073. service to avoid PageRank leaks or warn users that they are exiting your site.
  1074. ! Added spiffy new smoketest printDefinition.php, which lets you twiddle with
  1075. the configuration settings and see how the internal rules are affected.
  1076. ! New directive %URI.HostBlacklist for blocking links to bad hosts.
  1077. xssAttacks.php smoketest updated accordingly.
  1078. - Added missing type to ChildDef_Chameleon
  1079. - Remove Tidy option from demo if there is not Tidy available
  1080. . ChildDef_Required guards against empty tags
  1081. . Lookup table HTMLDefinition->info_flow_elements added
  1082. . Added peace-of-mind variable initialization to Strategy_FixNesting
  1083. . Added HTMLPurifier->info_parent_def, parent child processing made special
  1084. . Added internal documents briefly summarizing future progression of HTML
  1085. . HTMLPurifier_Config->getBatch($namespace) added
  1086. . More lenient casting to bool from string in HTMLPurifier_ConfigSchema
  1087. . Refactored ChildDef classes into their own files
  1088. 1.2.0, released 2006-11-19
  1089. # ID attributes now disabled by default. New directives:
  1090. + %HTML.EnableAttrID - restores old behavior by allowing IDs
  1091. + %Attr.IDPrefix - %Attr.IDBlacklist alternative that munges all user IDs
  1092. so that they don't collide with your IDs
  1093. + %Attr.IDPrefixLocal - Same as above, but for when there are multiple
  1094. instances of user content on the page
  1095. + Profuse documentation on how to use these available in docs/enduser-id.txt
  1096. ! Added MODx plugin <http://modxcms.com/forums/index.php/topic,6604.0.html>
  1097. ! Added percent encoding normalization
  1098. ! XSS attacks smoketest given facelift
  1099. ! Configuration documentation now has table of contents
  1100. ! Added %URI.DisableExternal, which prevents links to external websites. You
  1101. can also use %URI.Host to permit absolute linking to subdomains
  1102. ! Non-accessible resources (ex. mailto) blocked from embedded URIs (img src)
  1103. - Type variable in HTMLDefinition was not being set properly, fixed
  1104. - Documentation updated
  1105. + TODO added request Phalanger
  1106. + TODO added request Native compression
  1107. + TODO added request Remove redundant tags
  1108. + TODO added possible plaintext formatter for HTML Purifier documentation
  1109. + Updated ConfigDoc TODO
  1110. + Improved inline comments in AttrDef/Class.php, AttrDef/CSS.php
  1111. and AttrDef/Host.php
  1112. + Revamped documentation into HTML, along with misc updates
  1113. - HTMLPurifier_Context doesn't throw a variable reference error if you attempt
  1114. to retrieve a non-existent variable
  1115. . Switched to purify()-wide Context object registry
  1116. . Refactored unit tests to minimize duplication
  1117. . XSS attack sheet updated
  1118. . configdoc.xml now has xml:space attached to default value nodes
  1119. . Allow configuration directives to permit null values
  1120. . Cleaned up test-cases to remove unnecessary swallowErrors()
  1121. 1.1.2, released 2006-09-30
  1122. ! Add HTMLPurifier.auto.php stub file that configures include_path
  1123. - Documentation updated
  1124. + INSTALL document rewritten
  1125. + TODO added semi-lossy conversion
  1126. + API Doxygen docs' file exclusions updated
  1127. + Added notes on HTML versus XML attribute whitespace handling
  1128. + Noted that HTMLPurifier_ChildDef_Custom isn't being used
  1129. + Noted that config object's definitions are cached versions
  1130. - Fixed lack of attribute parsing in HTMLPurifier_Lexer_PEARSax3
  1131. - ftp:// URIs now have their typecodes checked
  1132. - Hooked up HTMLPurifier_ChildDef_Custom's unit tests (they weren't being run)
  1133. . Line endings standardized throughout project (svn:eol-style standardized)
  1134. . Refactored parseData() to general Lexer class
  1135. . Tester named "HTML Purifier" not "HTMLPurifier"
  1136. 1.1.1, released 2006-09-24
  1137. ! Configuration option to optionally Tidy up output for indentation to make up
  1138. for dropped whitespace by DOMLex (pretty-printing for the entire application
  1139. should be done by a page-wide Tidy)
  1140. - Various documentation updates
  1141. - Fixed parse error in configuration documentation script
  1142. - Fixed fatal error in benchmark scripts, slightly augmented
  1143. - As far as possible, whitespace is preserved in-between table children
  1144. - Sample test-settings.php file included
  1145. 1.1.0, released 2006-09-16
  1146. ! Directive documentation generation using XSLT
  1147. ! XHTML can now be turned off, output becomes <br>
  1148. - Made URI validator more forgiving: will ignore leading and trailing
  1149. quotes, apostrophes and less than or greater than signs.
  1150. - Enforce alphanumeric namespace and directive names for configuration.
  1151. - Table child definition made more flexible, will fix up poorly ordered elements
  1152. . Renamed ConfigDef to ConfigSchema
  1153. 1.0.1, released 2006-09-04
  1154. - Fixed slight bug in DOMLex attribute parsing
  1155. - Fixed rejection of case-insensitive configuration values when there is a
  1156. set of allowed values. This manifested in %Core.Encoding.
  1157. - Fixed rejection of inline style declarations that had lots of extra
  1158. space in them. This manifested in TinyMCE.
  1159. 1.0.0, released 2006-09-01
  1160. ! Shorthand CSS properties implemented: font, border, background, list-style
  1161. ! Basic color keywords translated into hexadecimal values
  1162. ! Table CSS properties implemented
  1163. ! Support for charsets other than UTF-8 (defined by iconv)
  1164. ! Malformed UTF-8 and non-SGML character detection and cleaning implemented
  1165. - Fixed broken numeric entity conversion
  1166. - API documentation completed
  1167. . (HTML|CSS)Definition de-singleton-ized
  1168. 1.0.0beta, released 2006-08-16
  1169. ! First public release, most functionality implemented. Notable omissions are:
  1170. + Shorthand CSS properties
  1171. + Table CSS properties
  1172. + Deprecated attribute transformations
  1173. vim: et sw=4 sts=4