Sanitize input string as multi-line text without HTML tags
This sanitizer is useful for user-submitted text from a plain-text <textarea> field, or any other kind of string value that might have multiple-lines.
Don’t use this sanitizer for values where you want to allow HTML (like rich text fields). For those values you should instead use the $sanitizer->purify() method.
If using returned value for front-end output, be sure to run it through $sanitizer->entities() first.
Usage
// basic usage$string = $sanitizer->textarea(string $value);
// usage with all arguments$string = $sanitizer->textarea(string $value, array$options= []);
Arguments
Name
Type(s)
Description
value
string
String value to sanitize
options (optional)
array
Options to modify default behavior
maxLength(int): maximum characters allowed, or 0=no max (default=16384 or 16kb).
maxBytes(int): maximum bytes allowed (default=0, which implies maxLength*4 or 64kb).
ProcessWire Weekly #533 In the 533rd issue of ProcessWire Weekly we'll check out some newly released third party modules and highlight a new site of the week. Read on!
Weekly.pw / 27 July 2024
Page List Custom Children module This simple module gives you the ability to customize the parent/child relationship as it appears in the admin page list, enabling child pages to appear under more than one parent.
Blog / 28 June 2024
Subscribe to weekly ProcessWire news
“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani