diff options
author | Thomas Lange <code@nerdmind.de> | 2021-07-11 18:26:45 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-07-11 18:26:45 +0200 |
commit | 29ae2e684677944d27d2d78d36c89b532fc8a05b (patch) | |
tree | e91b3d9d63c4753c4d51ee38ac7fe7fc6bd821b0 /core/functions.php | |
parent | a47cb63afa701a5ca1ddf07d81b1c93f45fdd45d (diff) | |
download | blog-29ae2e684677944d27d2d78d36c89b532fc8a05b.tar.gz blog-29ae2e684677944d27d2d78d36c89b532fc8a05b.tar.xz blog-29ae2e684677944d27d2d78d36c89b532fc8a05b.zip |
Remove wrapper function for strip_tags
Diffstat (limited to 'core/functions.php')
-rw-r--r-- | core/functions.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/core/functions.php b/core/functions.php index cefa76a..f1472ca 100644 --- a/core/functions.php +++ b/core/functions.php @@ -363,13 +363,6 @@ function escapeHTML($string): string { } #=============================================================================== -# Wrapper function for strip_tags() -#=============================================================================== -function removeHTML($string): string { - return strip_tags($string); -} - -#=============================================================================== # Remove all double line breaks from string #=============================================================================== function removeDoubleLineBreaks($string): 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); |