From 440a4d8076512c11bf6af14f20d7405338fb8af5 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 24 Mar 2008 05:15:28 +0000 Subject: [PATCH] Bring in forgotton tag_escape. Fixes #6368. git-svn-id: https://develop.svn.wordpress.org/trunk@7497 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 36393be453..967a4043dd 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1182,6 +1182,13 @@ function attribute_escape($text) { $safe_text = wp_specialchars($text, true); return apply_filters('attribute_escape', $safe_text, $text); } + +// Escape a HTML tag name +function tag_escape($tag_name) { + $safe_tag = strtolower( preg_replace('[^a-zA-Z_:]', '', $tag_name) ); + return apply_filters('tag_escape', $safe_tag, $tag_name); +} + /** * Escapes text for SQL LIKE special characters % and _ *