From d0c81c9f8e23362f8977dbf0f19b149c45c5abb5 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 16 Feb 2004 03:18:36 +0000 Subject: [PATCH] Fix for id= bug. Old code made obsolete by KSES. git-svn-id: http://svn.automattic.com/wordpress/trunk@876 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-formatting.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php index 6952585d0..fcd8747be 100644 --- a/wp-includes/functions-formatting.php +++ b/wp-includes/functions-formatting.php @@ -105,21 +105,6 @@ function convert_chars($content, $flag='obsolete attribute left there for backwa return $content; } -/** - ** sanitise HTML attributes, remove frame/applet/*script/mouseovers,etc. tags - ** so that this kind of thing cannot be done: - ** This is how we can do bad stuff! - **/ -function sanitise_html_attributes($text) { - $text = preg_replace('#(([\s"\'])on[a-z]{1,}|style|class|id)="(.*?)"#i', '$1', $text); - $text = preg_replace('#(([\s"\'])on[a-z]{1,}|style|class|id)=\'(.*?)\'#i', '$1', $text); - $text = preg_replace('#(([\s"\'])on[a-z]{1,}|style|class|id)[ \t]*=[ \t]*([^ \t\>]*?)#i', '$1', $text); - $text = preg_replace('#([a-z]{1,})="(( |\t)*?)(javascript|vbscript|about):(.*?)"#i', '$1=""', $text); - $text = preg_replace('#([a-z]{1,})=\'(( |\t)*?)(javascript|vbscript|about):(.*?)\'#i', '$1=""', $text); - $text = preg_replace('#\<(\/{0,1})([a-z]{0,2})(frame|applet)(.*?)\>#i', '', $text); - return $text; -} - /* balanceTags @@ -140,10 +125,6 @@ function sanitise_html_attributes($text) { */ function balanceTags($text, $is_comment = 0) { global $use_balanceTags; - - if ($is_comment) { - $text = sanitise_html_attributes($text); - } if ($use_balanceTags == 0) { return $text;