$sanitizer->emailHeader() method

Returns a value that may be used in an email header

This method is designed to prevent one email header from injecting into another.

Usage

// basic usage
$string = $sanitizer->emailHeader(string $value);

// usage with all arguments
$string = $sanitizer->emailHeader(string $value, bool $headerName = false);

Arguments

NameType(s)Description
valuestring
headerName (optional)bool

Sanitize a header name rather than header value? (default=false) Since 3.0.132

Return value

string


$sanitizer methods and properties

API reference based on ProcessWire core version 3.0.137

Twitter updates

  • ProcessWire 3.0.142 has a lot of updates but the biggest is the addition of custom fields support for file and image fields. In this post, we take a closer look at that, and also outline all of the new features in the just-released FormBuilder v40— More
    11 October 2019
  • This week’s dev branch version brings you improvements to ProcessWire’s input->cookie API variable, plus it adds the ability to modify system URLs and paths at runtime. This post also includes some examples to demonstrate just how useful this can be— More
    20 September 2019
  • New post: This week we’ll take a look at a new version of FormBuilder that's on the way (with a screencast), as well as the latest version of the core: ProcessWire 3.0.140— More
    6 September 2019

Latest news

  • ProcessWire Weekly #284
    In the 284th issue of ProcessWire Weekly we're going to take a quick look at the latest core updates, introduce a new module called InputfieldFloatRange, and continue our ongoing poll series #processwireworks. Read on!
    Weekly.pw / 20 October 2019
  • ProcessWire 3.0.142 core updates
    This latest version of the core on the dev branch has a lot of updates, and the biggest is the addition of custom fields support for file and image fields. In this post, we take a closer look and also outline all of the new features in the just-released FormBuilder v40.
    Blog / 11 October 2019
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits