Makes content safe to print on screen.
This function should only be used on output. Except uploading images, never use this function on input.
All inputted data should be accepted and then purified on output for optimal results. For output of images, make sure
to escape with esc_url()
.
<?php
use function Qubus\Security\Helpers\purify_html;
purify_html(string $string, bool $isImage = false): string;
$string (string) (required) Output to purify.
$isImage (bool) (optional) Whether the output is an image.
(string) The purified output.
Last Updated on August 14, 2024 by Joshua