Ticket #2650: balanceTags.diff

File balanceTags.diff, 919 bytes (added by markjaquith, 7 years ago)

balanceTags() fix

  • wp-includes/functions-formatting.php

     
    383383        return $text; 
    384384} 
    385385 
     386function balanceTags($text, $is_comment = 0) { 
     387        if ( get_options('use_balanceTags') == 0 ) 
     388                return $text; 
     389        return wpbalancetags($text, $is_comment); 
     390} 
     391 
    386392/* 
    387  balanceTags 
     393 wpbalancetags 
    388394  
    389395 Balances Tags of string using a modified stack. 
    390396  
     
    402408                  Added Cleaning Hooks 
    403409             1.0  First Version 
    404410*/ 
    405 function balanceTags($text, $is_comment = 0) { 
     411function wpbalancetags($text, $is_comment = 0) { 
    406412 
    407         if ( get_option('use_balanceTags') == 0) 
    408                 return $text; 
    409  
    410413        $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = ''; 
    411414 
    412415        # WP bug fix for comments - in case you REALLY meant to type '< !--'