Changeset 6302

Show
Ignore:
Timestamp:
08/19/06 05:57:37 (2 years ago)
Author:
GamerZ
Message:

Fixed Validation Bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-stats/trunk/stats/stats.php

    r6295 r6302  
    450450### Function: Snippet Characters 
    451451function snippet_chars($text, $length = 0) { 
     452      $text = htmlspecialchars_decode($text); 
    452453       if (strlen($text) > $length){        
    453             return substr($text,0,$length).'...';              
     454            return htmlspecialchars(substr($text,0,$length)).'...';              
    454455       } else { 
    455             return $text
     456            return htmlspecialchars($text)
    456457       } 
     458} 
     459 
     460 
     461### Function: HTML Special Chars Decode 
     462if (!function_exists('htmlspecialchars_decode')) { 
     463   function htmlspecialchars_decode($text) { 
     464       return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS))); 
     465   } 
    457466} 
    458467 
     
    490499      $page = intval($_GET['stats_page']); 
    491500      $temp_stats = ''; 
     501      $temp_post = $post; 
    492502 
    493503      // Default wp-stats.php Page 
     
    708718                        $cache_post_title = $post_title; 
    709719                  } 
    710                   $post = null; 
    711720            } else { 
    712721                        $temp_stats .= "<p>$comment_author has not made any comments yet.</p>\n"; 
     
    762771            $temp_stats .= '<p><b>&laquo;&laquo;</b> <a href="'.$stats_url.'">Back To Stats Page</a></p>'."\n"; 
    763772      } // End If 
     773       
     774      // Assign Back $post 
     775      $post = $temp_post; 
    764776 
    765777      // Output Stats Page