API / Minn\Support / Escape

Escape final class

Minn\Support\Escape · public/minn/src/Minn/Support/Escape.php · 25 lines

Text made safe for HTML the way WordPress's escapers make it (esc_html, esc_attr): invalid UTF-8 emptied, entities already present normalised rather than encoded again, the specials and both quotes encoded, then the filter plugins hook (esc_html, attribute_escape) handed the result and the original.

Public

statichtml(mixed $text): string#

Text for an element's content.

staticattr(mixed $text): string#

Text for an attribute's value.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privateencoded(string $text): string#