HTML Purifier 3.0: For PHP5 Only, More CSS
Version 3.0.0 of HTML Purifier, a PHP library for purifying HTML has just been released with numerous new features.
The major change relates to the handling of style instructions. The new version of the library ignores case in CSS property handling, and it offers experimental support for a number of proprietary CSS extensions. The PHP "HTMLPurifier_Filter_ExtractStyleBlocks" class can filter style segments out of the HTML code and pass them in to the external CSSTidy tool for validation and purifying.
Version 3.0.0 is also the first HTML Purifier release to support PHP 5 only. It is suitable for any PHP 5 version and uses the "E_STRICT" setting for error reporting. The developers will continue to maintain the Purifier 2.1.x branch for PHP 4 developers until PHP 4 officially reaches deprecated status.
HTML Purifier is mainly suitable for handling HTML code entered by users, such as in Web forums. The library uses a configurable whitelist of desirable HTML elements to restrict output on websites. At the same time, Purifier prevents attacks relying on cross-site scripting (XSS) and ensures standards conform HTML. A demo page gives visitors a first impression of the features.
HTML Purifier is released under the LGPL Version 2.1 or newer. A tarball with the source code and an installation how-to for PHP Extension and Application Repository (PEAR) are available from the project's download page.
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.