Ticket #2661: 2661.diff
| File 2661.diff, 1.8 KB (added by , 20 years ago) |
|---|
-
wp-includes/kses.php
1 1 <?php 2 2 3 3 // Added wp_ prefix to avoid conflicts with existing kses users 4 # kses 0.2. 1- HTML/XHTML filter that only allows some elements and attributes5 # Copyright (C) 2002, 2003 Ulf Harnhammar4 # kses 0.2.2 - HTML/XHTML filter that only allows some elements and attributes 5 # Copyright (C) 2002, 2003, 2005 Ulf Harnhammar 6 6 # *** CONTACT INFORMATION *** 7 7 # 8 8 # E-mail: metaur at users dot sourceforge dot net … … 113 113 $elem = $matches[2]; 114 114 $attrlist = $matches[3]; 115 115 116 if (!@ is_array($allowed_html[strtolower($elem)]))116 if (!@isset($allowed_html[strtolower($elem)])) 117 117 return ''; 118 118 # They are using a not allowed HTML element 119 119 … … 366 366 ############################################################################### 367 367 { 368 368 $string = wp_kses_no_null($string); 369 $string = preg_replace('/\xad+/', '', $string); # deals with Opera "feature" 369 370 $string2 = $string.'a'; 370 371 371 372 while ($string != $string2) { … … 378 379 379 380 function wp_kses_no_null($string) 380 381 ############################################################################### 381 # This function removes any NULL or chr(173)characters in $string.382 # This function removes any NULL characters in $string. 382 383 ############################################################################### 383 384 { 384 385 $string = preg_replace('/\0+/', '', $string); … … 454 455 $string2 = wp_kses_decode_entities($string); 455 456 $string2 = preg_replace('/\s/', '', $string2); 456 457 $string2 = wp_kses_no_null($string2); 458 $string2 = preg_replace('/\xad+/', '', $string2); 459 # deals with Opera "feature" 457 460 $string2 = strtolower($string2); 458 461 459 462 $allowed = false;