From 29ae2e684677944d27d2d78d36c89b532fc8a05b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sun, 11 Jul 2021 18:26:45 +0200 Subject: Remove wrapper function for strip_tags --- core/functions.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'core/functions.php') diff --git a/core/functions.php b/core/functions.php index cefa76a..f1472ca 100644 --- a/core/functions.php +++ b/core/functions.php @@ -362,13 +362,6 @@ function escapeHTML($string): string { return htmlspecialchars($string); } -#=============================================================================== -# Wrapper function for strip_tags() -#=============================================================================== -function removeHTML($string): string { - return strip_tags($string); -} - #=============================================================================== # Remove all double line breaks from string #=============================================================================== @@ -404,7 +397,7 @@ function truncate($string, $length, $replace = '') { # Return excerpt content #=============================================================================== function excerpt($string, $length = 500, $replace = ' […]') { - $string = removeHTML($string); + $string = strip_tags($string); $string = removeDoubleLineBreaks($string); $string = truncate($string, $length, $replace); $string = nl2br($string); @@ -416,7 +409,7 @@ function excerpt($string, $length = 500, $replace = ' […]') { # Return content for meta description #=============================================================================== function description($string, $length = 200, $replace = ' […]') { - $string = removeHTML($string); + $string = strip_tags($string); $string = removeWhitespace($string); $string = truncate($string, $length, $replace); -- cgit v1.2.3