$sanitizer->purify() method

Purify HTML markup using HTML Purifier

See: htmlpurifier.org

Usage

// basic usage
$string = $sanitizer->purify(string $str);

// usage with all arguments
$string = $sanitizer->purify(string $str, array $options = []);

Arguments

NameType(s)Description
strstring

String to purify

options (optional)array

See config options.

Return value

string

Purified markup string.


$sanitizer methods and properties

API reference based on ProcessWire core version 3.0.127

Twitter updates

  • New post: This week ProcessWire ProMailer has been released, plus we’ve got a nice upgrade in our community support forum, and more— More
    15 March 2019
  • New post: This week we look at the latest version of ProcessWire, 3.0.127 with nearly 30 new commits resolving dozens of older issue reports and a couple useful new features— More
    1 March 2019
  • New post: This week we take a look at what’s in ProcessWire 3.0.126 which focuses largely on resolving issue reports, but also includes a handy new Page if() method— More
    15 February 2019

Latest news

  • ProcessWire Weekly #254
    In the 254th issue of ProcessWire Weekly we'll cover the latest core updates, highlights some of the things that have been going on at the forums and elsewhere, and introduce a brand new site of the week. Read on!
    Weekly.pw / 24 March 2019
  • ProcessWire ProMailer now available
    This week ProcessWire ProMailer has been released, plus we’ve got a nice upgrade in our community support forum, and more.
    Blog / 15 March 2019
  • Subscribe to weekly ProcessWire news

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer