Entity encode a string with optional Markdown support.
- Markdown support provided with second argument.
- If string is already entity-encoded it will first be decoded.
Usage
// basic usage
$string = $inputfield->entityEncode(string $str);
// usage with all arguments
$string = $inputfield->entityEncode(string $str, $markdown = false);
Arguments
Name | Type(s) | Description |
---|---|---|
str | string | String to encode |
markdown (optional) | bool, int | Optionally specify one of the following:
|
Return value
string
Entity encoded string or HTML string
Inputfield methods and properties
API reference based on ProcessWire core version 3.0.236