NEWS 71 KB

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