Sanitize text and remove a potentially dangerous HTML and JavaScript.
descript( string $text [, bool $strip_tags, bool $strip_scripts ] ) : string
$text (string) (Required) String to be descripted.
$strip_tags (bool) (Optional) Removes potentially dangerous HTML tags. Default value: true
$strip_scripts (bool) (Optional) Removes <script> tags. Default value: true
(string) Sanitized and safe string.
$text = 'Text <a href="javascript:function()">click</a> <i onload=xss></i> <script>javascript code</script>';
echo descript($text);
// Text <a href="nojavascript...function()">click</a> <i >></i> javascript code