From::HTML()

Encodes HTML special characters.

Table of Contents
  1. Description
  2. Example

Description

From::HTML(?string $value, bool $deep = false): ?string;

This method encodes HTML special characters so that the result will be safe to use inside HTML attribute value or in <textarea> element content.

Example

$value = From::HTML('<foo bar="baz">'); // Returns `'&lt;foo bar=&quot;baz&quot;&gt;'`

From::HTML()

Encodes HTML special characters.

From::entity()

Converts HTML entities to their corresponding characters.