diff options
Diffstat (limited to 'wp-includes/formatting.php')
-rw-r--r-- | wp-includes/formatting.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index a756f6d..b097d00 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4802,12 +4802,13 @@ EOF; * Escapes an HTML tag name. * * @since 2.5.0 + * @since 6.5.5 Allow hyphens in tag names (i.e. custom elements). * * @param string $tag_name * @return string */ function tag_escape( $tag_name ) { - $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9_:]/', '', $tag_name ) ); + $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) ); /** * Filters a string cleaned and escaped for output as an HTML tag. * |