Encode a string with HTML entities via PHP's htmlentities() function. This is the opposite of the decode modifier.
string: "The 'bacon' is <b>crispy</b>"
{{ string | entities }}
{{ Statamic::modify($string)->entities() }}
The 'bacon' is <b>crispy</b>